aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/utility.txx
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/config/utility.txx')
-rw-r--r--libbuild2/config/utility.txx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/config/utility.txx b/libbuild2/config/utility.txx
index 9c1455f..4c4e305 100644
--- a/libbuild2/config/utility.txx
+++ b/libbuild2/config/utility.txx
@@ -13,7 +13,7 @@ namespace build2
pair<lookup, bool>
required (scope& root,
const variable& var,
- const T& def_val,
+ T&& def_val,
bool def_ovr,
uint64_t save_flags)
{
@@ -35,7 +35,7 @@ namespace build2
//
if (!l.defined () || (def_ovr && !l.belongs (root)))
{
- value& v (root.assign (var) = def_val);
+ value& v (root.assign (var) = std::forward<T> (def_val)); // VC14
v.extra = true; // Default value flag.
n = (save_flags & save_commented) == 0; // Absence means default.