diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-21 15:39:52 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-21 15:39:52 +0200 |
commit | c1d08dbc56d0c8d3346deaba5d6b1946b6d711f4 (patch) | |
tree | de85880067c80e56d83de8e3902d95f2c2f9d7c5 /build2/variable | |
parent | 01fe759b58fbde7f8c7391122421dd08c754dc51 (diff) |
Save config vars in order specified rather than alphabetically
This way we can group them semantically which results in easier to
understand config.build output.
Diffstat (limited to 'build2/variable')
-rw-r--r-- | build2/variable | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build2/variable b/build2/variable index 08d0020..e2dc943 100644 --- a/build2/variable +++ b/build2/variable @@ -119,8 +119,6 @@ namespace build2 inline bool operator== (const variable& x, const variable& y) {return x.name == y.name;} - typedef reference_wrapper<const variable> variable_cref; - // // class value @@ -647,7 +645,8 @@ namespace std namespace butl { template <> - struct compare_prefix<build2::variable_cref>: compare_prefix<std::string> + struct compare_prefix<std::reference_wrapper<const build2::variable>>: + compare_prefix<std::string> { typedef compare_prefix<std::string> base; @@ -713,7 +712,9 @@ namespace build2 class variable_map { public: - using map_type = butl::prefix_map<variable_cref, value, '.'>; + using map_type = butl::prefix_map<reference_wrapper<const variable>, + value, + '.'>; using size_type = map_type::size_type; template <typename I> |