aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/variable.ixx9
1 files changed, 9 insertions, 0 deletions
diff --git a/build2/variable.ixx b/build2/variable.ixx
index 3184108..76a52c1 100644
--- a/build2/variable.ixx
+++ b/build2/variable.ixx
@@ -86,6 +86,15 @@ namespace build2
return v.as<names> ();
}
+ template <>
+ inline names&
+ cast (value& v)
+ {
+ assert (!v.null () &&
+ (v.type == nullptr || v.type == &value_traits<names>::value_type));
+ return v.as<names> ();
+ }
+
template <typename T>
inline const T&
cast (const value& v)