aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-11-11 15:05:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-11-11 15:05:30 +0200
commit60a95915aa1fda93d308158416071ba39286d41c (patch)
tree98abce912c5d28ef65e92ac5ebdeb9a03df5530c /libbuild2/variable.hxx
parent011adfe1efe3ff20dc019e242d56c95b2b35ac13 (diff)
Make value_traits<bool>::convert() non-modifying
Diffstat (limited to 'libbuild2/variable.hxx')
-rw-r--r--libbuild2/variable.hxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx
index 3152c71..a671978 100644
--- a/libbuild2/variable.hxx
+++ b/libbuild2/variable.hxx
@@ -704,7 +704,10 @@ namespace build2
{
static_assert (sizeof (bool) <= value::size_, "insufficient space");
- static bool convert (name&&, name*);
+ // Note: in some places we rely on the convert() function not changing
+ // the passed names thus we make them const.
+ //
+ static bool convert (const name&, const name*);
static void assign (value&, bool);
static void append (value&, bool); // OR.
static name reverse (bool x) {return name (x ? "true" : "false");}