aboutsummaryrefslogtreecommitdiff
path: root/build2/variable
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-08-23 09:05:54 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-08-23 09:05:54 +0200
commitbd32ea47fd8f720b54f81a769dc007d1fdb4e5c1 (patch)
treeefd3aec2fd1e2fd65b0262470de5a2e82d9c8449 /build2/variable
parentce030e8bf6a8f278eb3a571aef0f0df18875daa7 (diff)
Reverse empty simple values as an empty names sequence rather than empty name
This way we get: config.import.foo = Rather than: config.import.foo = {}
Diffstat (limited to 'build2/variable')
-rw-r--r--build2/variable2
1 files changed, 2 insertions, 0 deletions
diff --git a/build2/variable b/build2/variable
index 1248bd3..fb44bb4 100644
--- a/build2/variable
+++ b/build2/variable
@@ -476,6 +476,7 @@ namespace build2
static void append (value&, bool); // OR.
static name reverse (bool x) {return name (x ? "true" : "false", false);}
static int compare (bool, bool);
+ static bool empty (bool) {return false;}
static const char* const type_name;
static const build2::value_type value_type;
@@ -491,6 +492,7 @@ namespace build2
static void append (value&, uint64_t); // ADD.
static name reverse (uint64_t x) {return name (to_string (x), false);}
static int compare (uint64_t, uint64_t);
+ static bool empty (bool) {return false;}
static const char* const type_name;
static const build2::value_type value_type;