aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-04-20 08:27:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-04-20 08:27:44 +0200
commit76697cbfae866d4ce2171f18ce164da87c652bc5 (patch)
treed3bdf0d73e55093fcd84f2c48866ce27f5387ca8
parenta88198b4b19d68e2ab45604dad9c8b3c40470cbd (diff)
Add missing cast() specialization
-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)