From 7a7b8ba432977282a90567c77822a72645d2a5c8 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 9 Apr 2016 07:48:02 +0200 Subject: Add abs_dir_path type, auto-complete if initialized from names --- build2/variable | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'build2/variable') 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 + { + 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 <> -- cgit v1.1