aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-08-24 10:51:26 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-08-24 10:51:26 +0200
commitb86c1d8d2e0be140f6854d869e07139ff3c4221c (patch)
tree02b38914484afb6c2a69d041cf026f1d377220bf /libbuild2/variable.hxx
parentb2df0b0663d0537dd3b4f2d28d145ccd90417cab (diff)
Add copying version of convert<T>(value)
Diffstat (limited to 'libbuild2/variable.hxx')
-rw-r--r--libbuild2/variable.hxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx
index 6c78c95..3152c71 100644
--- a/libbuild2/variable.hxx
+++ b/libbuild2/variable.hxx
@@ -47,6 +47,8 @@ namespace build2
//
const value_type* base_type;
+ template <typename T> const value_type* is_a () const;
+
// Element type, if this is a vector.
//
const value_type* element_type;
@@ -628,6 +630,10 @@ namespace build2
//
template <typename T> T convert (value&&);
+ // As above but preserving the value.
+ //
+ template <typename T> T convert (const value&);
+
// Default implementations of the dtor/copy_ctor/copy_assing callbacks for
// types that are stored directly in value::data_ and the provide all the
// necessary functions (copy/move ctor and assignment operator).