diff options
author | Jenkins nedprod CI <jenkins-nedprod@europe5.nedproductions.biz> | 2020-07-11 02:00:10 +0300 |
---|---|---|
committer | Jenkins nedprod CI <jenkins-nedprod@europe5.nedproductions.biz> | 2020-07-11 02:00:10 +0300 |
commit | debf7ce308c18aafdfa97966c33b1400cbd199bf (patch) | |
tree | 5ca65df7761273f938ed66555fd6ec87f60abb30 | |
parent | 9699920798dc7786e543ac7832ed9e6f8cb1e500 (diff) | |
parent | 02a501799dbf689063b09f9f557b2057c53022d9 (diff) |
Merged from develop branch as CDash reports all green
-rw-r--r-- | cmake/headers.cmake | 2 | ||||
-rw-r--r-- | include/llfio/revision.hpp | 6 | ||||
-rw-r--r-- | include/llfio/v2.0/path_view.hpp | 57 |
3 files changed, 13 insertions, 52 deletions
diff --git a/cmake/headers.cmake b/cmake/headers.cmake index 19c89a6e..af4511e6 100644 --- a/cmake/headers.cmake +++ b/cmake/headers.cmake @@ -9,6 +9,8 @@ set(llfio_HEADERS "include/llfio/ntkernel-error-category/include/ntkernel-error-category/ntkernel_category.hpp" "include/llfio/revision.hpp" "include/llfio/v2.0/algorithm/clone.hpp" + "include/llfio/v2.0/algorithm/contents.hpp" + "include/llfio/v2.0/algorithm/difference.hpp" "include/llfio/v2.0/algorithm/handle_adapter/cached_parent.hpp" "include/llfio/v2.0/algorithm/handle_adapter/combining.hpp" "include/llfio/v2.0/algorithm/handle_adapter/xor.hpp" diff --git a/include/llfio/revision.hpp b/include/llfio/revision.hpp index bbd5205c..1e942204 100644 --- a/include/llfio/revision.hpp +++ b/include/llfio/revision.hpp @@ -1,4 +1,4 @@ // Note the second line of this file must ALWAYS be the git SHA, third line ALWAYS the git SHA update time -#define LLFIO_PREVIOUS_COMMIT_REF cc0e5e5ad9c04b23aadfc8eed704b2c2194292ea -#define LLFIO_PREVIOUS_COMMIT_DATE "2020-07-08 12:34:00 +00:00" -#define LLFIO_PREVIOUS_COMMIT_UNIQUE cc0e5e5a +#define LLFIO_PREVIOUS_COMMIT_REF 804dcb157c208bf918aea37eb98e149934b51e4f +#define LLFIO_PREVIOUS_COMMIT_DATE "2020-07-10 14:04:55 +00:00" +#define LLFIO_PREVIOUS_COMMIT_UNIQUE 804dcb15 diff --git a/include/llfio/v2.0/path_view.hpp b/include/llfio/v2.0/path_view.hpp index 87d3dc64..d296b9c4 100644 --- a/include/llfio/v2.0/path_view.hpp +++ b/include/llfio/v2.0/path_view.hpp @@ -1857,61 +1857,18 @@ constexpr inline int path_view::compare(path_view o) const return 0; // identical } -namespace detail -{ - template <bool do_concat> struct path_view_concatenate_visitor - { - filesystem::path &a; - explicit path_view_concatenate_visitor(filesystem::path &_a) - : a(_a) - { - } - template <class CharT> void operator()(basic_string_view<CharT> sv) const - { - if(do_concat) - { - a.concat(sv); - } - else - { - a.append(sv); - } - } - void operator()(basic_string_view<char8_t> sv) - { -#if(__cplusplus >= 202000 || _HAS_CXX20) && (!defined(_LIBCPP_VERSION) || _LIBCPP_VERSION > 10000 /* approx start of 2020 */) - if(do_concat) - { - a.concat(sv); - } - else - { - a.append(sv); - } -#else - if(do_concat) - { - a+=filesystem::u8path((const char *) sv.data(), (const char *) sv.data() + sv.size()); - } - else - { - a/=filesystem::u8path((const char *) sv.data(), (const char *) sv.data() + sv.size()); - } -#endif - } - }; -} // namespace detail - //! Append a path view component to a path inline filesystem::path &operator+=(filesystem::path &a, path_view_component b) { - visit(b, detail::path_view_concatenate_visitor<true>(a)); + path_view_component::c_str<> zpath(b); + a.concat(zpath.buffer); return a; } //! Append a path view component to a path inline filesystem::path &operator/=(filesystem::path &a, path_view_component b) { - visit(b, detail::path_view_concatenate_visitor<false>(a)); + path_view_component::c_str<> zpath(b); + a.append(zpath.buffer); return a; } //! Append a path view component to a path @@ -1922,13 +1879,15 @@ inline filesystem::path operator/(filesystem::path a, path_view_component b) //! Append a path view to a path inline filesystem::path &operator+=(filesystem::path &a, path_view b) { - visit(b, detail::path_view_concatenate_visitor<true>(a)); + path_view::c_str<> zpath(b); + a.concat(zpath.buffer); return a; } //! Append a path view to a path inline filesystem::path &operator/=(filesystem::path &a, path_view b) { - visit(b, detail::path_view_concatenate_visitor<false>(a)); + path_view::c_str<> zpath(b); + a.append(zpath.buffer); return a; } //! Append a path view to a path |