diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-16 10:53:39 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-11-18 17:30:47 +0200 |
commit | aeeedd32f8717d8c6a1886a5561a879059be87d0 (patch) | |
tree | cdd4c893e05a1e950f689443ac63f532df721352 /build2/name | |
parent | a7efabf301f23364ac2335c80c5e1e712bc43204 (diff) |
Make names and vector<name> different types, add typed value constructor
Diffstat (limited to 'build2/name')
-rw-r--r-- | build2/name | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/build2/name b/build2/name index 12aa9dc..e079c9f 100644 --- a/build2/name +++ b/build2/name @@ -125,7 +125,15 @@ namespace build2 // Vector of names. // - using names = vector<name>; + // We make it a separate type rather than an alias for vector<name> in order + // to distinguish between untyped variable values (names) and typed ones + // (vector<name>). + // + struct names: vector<name> + { + using vector::vector; + }; + using names_view = vector_view<const name>; // The same semantics as to_stream(name). |