aboutsummaryrefslogtreecommitdiff
path: root/build2/variable.ixx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-03-07 10:24:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-03-07 10:24:02 +0200
commit8205a652a4616aea84f24ff31235ea9941f47db6 (patch)
treebd63a17e6944575f0d8dc0519e86d8a5513b6b5c /build2/variable.ixx
parentec2247ead804e7cde1fe6a0f0b8112440e80a61c (diff)
Specify config.test.output variable
Diffstat (limited to 'build2/variable.ixx')
-rw-r--r--build2/variable.ixx22
1 files changed, 19 insertions, 3 deletions
diff --git a/build2/variable.ixx b/build2/variable.ixx
index dfe5c84..8656a04 100644
--- a/build2/variable.ixx
+++ b/build2/variable.ixx
@@ -490,10 +490,26 @@ namespace build2
new (&v.data_) name (move (x));
}
- inline int value_traits<name>::
- compare (const name& l, const name& r)
+ // name_pair value
+ //
+ inline void value_traits<name_pair>::
+ assign (value& v, name_pair&& x)
{
- return l.compare (r);
+ if (v)
+ v.as<name_pair> () = move (x);
+ else
+ new (&v.data_) name_pair (move (x));
+ }
+
+ inline int value_traits<name_pair>::
+ compare (const name_pair& x, const name_pair& y)
+ {
+ int r (x.first.compare (y.first));
+
+ if (r == 0)
+ r = x.second.compare (y.second);
+
+ return r;
}
// process_path value