diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-09 07:48:02 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-04-09 07:48:02 +0200 |
commit | 7a7b8ba432977282a90567c77822a72645d2a5c8 (patch) | |
tree | 6abac0b3fad817c4149bc34d80b9c0e6e4a31168 /build2/variable | |
parent | 6906097a822517af4dc711825132d5f026329c62 (diff) |
Add abs_dir_path type, auto-complete if initialized from names
Diffstat (limited to 'build2/variable')
-rw-r--r-- | build2/variable | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/build2/variable b/build2/variable index a3c1ea6..5a33037 100644 --- a/build2/variable +++ b/build2/variable @@ -479,6 +479,23 @@ namespace build2 static const build2::value_type value_type; }; + // abs_dir_path + // + template <> + struct value_traits<abs_dir_path> + { + static_assert (sizeof (abs_dir_path) <= value::size_, + "insufficient space"); + + static abs_dir_path convert (name&&, name*); + static bool assign (value&, abs_dir_path&&); + static bool append (value&, abs_dir_path&&); // operator/ + static name reverse (const abs_dir_path& x) {return name (x);} + static int compare (const abs_dir_path&, const abs_dir_path&); + + static const build2::value_type value_type; + }; + // name // template <> |