aboutsummaryrefslogtreecommitdiff
path: root/build/path-map
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2015-06-18 12:25:02 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2015-06-18 12:25:02 +0200
commit4cda4b89c16932f02e04c5019a71b659ccf821e6 (patch)
tree8fbaddb1c64a53c9c871c1a96a99ec64490d222a /build/path-map
parent5cb5b09b198932a0d3bd985fd52fd9fbcb1c2af5 (diff)
Move prefix-map from build2 to libbutl
Diffstat (limited to 'build/path-map')
-rw-r--r--build/path-map19
1 files changed, 13 insertions, 6 deletions
diff --git a/build/path-map b/build/path-map
index b95f2a6..8355ccc 100644
--- a/build/path-map
+++ b/build/path-map
@@ -5,11 +5,15 @@
#ifndef BUILD_PATH_MAP
#define BUILD_PATH_MAP
+#include <butl/prefix-map>
+
#include <build/path>
-#include <build/prefix-map>
-namespace build
+namespace butl
{
+
+ // @@ Remove butl:: when move to libbutl.
+
// prefix_map for paths
//
// The paths should be normalized.
@@ -25,9 +29,9 @@ namespace build
// it.
//
template <typename C, typename K>
- struct compare_prefix<basic_path<C, K>>: compare_prefix<std::basic_string<C>>
+ struct compare_prefix<build::basic_path<C, K>>: compare_prefix<std::basic_string<C>>
{
- typedef basic_path<C, K> key_type;
+ typedef build::basic_path<C, K> key_type;
typedef C delimiter_type;
typedef std::basic_string<C> string_type;
@@ -69,13 +73,16 @@ namespace build
#endif
}
};
+}
+namespace build
+{
template <typename T>
- using path_map = prefix_map<path, T, path::traits::directory_separator>;
+ using path_map = butl::prefix_map<path, T, path::traits::directory_separator>;
template <typename T>
using dir_path_map =
- prefix_map<dir_path, T, dir_path::traits::directory_separator>;
+ butl::prefix_map<dir_path, T, dir_path::traits::directory_separator>;
}
#endif // BUILD_PATH_MAP