From dbf37dc16ad9549ce5a1021c74fe369ab2e0d917 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 30 Sep 2022 05:15:58 +0200 Subject: Move integer and bool function to separate source/testscript files --- libbuild2/functions-bool.cxx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 libbuild2/functions-bool.cxx (limited to 'libbuild2/functions-bool.cxx') diff --git a/libbuild2/functions-bool.cxx b/libbuild2/functions-bool.cxx new file mode 100644 index 0000000..1ae89d2 --- /dev/null +++ b/libbuild2/functions-bool.cxx @@ -0,0 +1,20 @@ +// file : libbuild2/functions-bool.cxx -*- C++ -*- +// license : MIT; see accompanying LICENSE file + +#include +#include + +using namespace std; + +namespace build2 +{ + void + bool_functions (function_map& m) + { + function_family f (m, "bool"); + + // $string() + // + f["string"] += [](bool b) {return b ? "true" : "false";}; + } +} -- cgit v1.1