From 551ac72f30d6e87985525c9104a6ccf9241ef450 Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Mon, 11 Nov 2024 10:21:42 -0600 Subject: [PATCH 1/2] Move stray type traits into detail namespace --- .../v_noabi/bsoncxx/types/bson_value/view.hpp | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp index 11e0482356..d01b31fc93 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp @@ -27,6 +27,22 @@ #include +namespace bsoncxx { +namespace detail { + +template +using is_bson_view_compatible = + detail::conjunction, + detail::negation, + detail::is_alike>>>; + +template +using not_view = is_bson_view_compatible; + +} // namespace detail +} // namespace bsoncxx + namespace bsoncxx { namespace v_noabi { namespace types { @@ -303,15 +319,6 @@ class view { }; }; -template -using is_bson_view_compatible = detail::conjunction< - std::is_constructible, - detail::negation, - detail::is_alike>>>; - -template -using not_view = is_bson_view_compatible; - /// /// Compares a view with a type representable as a view. /// @@ -322,28 +329,28 @@ using not_view = is_bson_view_compatible; /// @relatesalso bsoncxx::v_noabi::types::bson_value::view template -detail::requires_t> // +detail::requires_t> // operator==(const bson_value::view& lhs, T&& rhs) { return lhs == bson_value::view{std::forward(rhs)}; } /// @relatesalso bsoncxx::v_noabi::types::bson_value::view template -detail::requires_t> // +detail::requires_t> // operator==(T&& lhs, const bson_value::view& rhs) { return bson_value::view{std::forward(lhs)} == rhs; } /// @relatesalso bsoncxx::v_noabi::types::bson_value::view template -detail::requires_t> // +detail::requires_t> // operator!=(const bson_value::view& lhs, T&& rhs) { return lhs != bson_value::view{std::forward(rhs)}; } /// @relatesalso bsoncxx::v_noabi::types::bson_value::view template -detail::requires_t> // +detail::requires_t> // operator!=(T&& lhs, const bson_value::view& rhs) { return bson_value::view{std::forward(lhs)} != rhs; } From 83301da567599a6dda039ec0cb51ec0046df242c Mon Sep 17 00:00:00 2001 From: Ezra Chung Date: Mon, 11 Nov 2024 10:22:03 -0600 Subject: [PATCH 2/2] Remove unused type trait --- .../include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp index d01b31fc93..8c5b7bd0ae 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp @@ -37,9 +37,6 @@ using is_bson_view_compatible = detail::is_alike, detail::is_alike>>>; -template -using not_view = is_bson_view_compatible; - } // namespace detail } // namespace bsoncxx