diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-06-25 20:39:53 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-06-26 13:46:49 +0300 |
commit | e755de789e146beea66bf6a4b55685034502df41 (patch) | |
tree | 4e67a579324e84bce2ac991443b92b5546a76422 /build2/variable.cxx | |
parent | 9488972a30b3cc06f0dd8d704d920f30fd335add (diff) |
Make path value type to be base for dir_path
Diffstat (limited to 'build2/variable.cxx')
-rw-r--r-- | build2/variable.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/build2/variable.cxx b/build2/variable.cxx index bcf9d62..8e32b30 100644 --- a/build2/variable.cxx +++ b/build2/variable.cxx @@ -568,7 +568,12 @@ namespace build2 { return path (move (n.value)); } - catch (const invalid_path&) {} // Fall through. + catch (invalid_path& e) + { + n.value = move (e.path); // Restore the name object for diagnostics. + + // Fall through. + } } // Fall through. @@ -627,7 +632,7 @@ namespace build2 { type_name, sizeof (dir_path), - nullptr, // No base, or should it be path? + &value_traits<path>::value_type, // Assume direct cast works for both. &default_dtor<dir_path>, &default_copy_ctor<dir_path>, &default_copy_assign<dir_path>, |