From ba29bb05c444fe682298d695567108758ead5e0b Mon Sep 17 00:00:00 2001 From: Takayama Fumihiko Date: Thu, 21 Mar 2024 09:03:19 +0900 Subject: [PATCH] Update vendor --- .../install/include/boost/ut.hpp | 42 ++++++++++++------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/tests/vendor/cget/pkg/boost-ext__ut/install/include/boost/ut.hpp b/tests/vendor/cget/pkg/boost-ext__ut/install/include/boost/ut.hpp index c0a56c2..05a1790 100644 --- a/tests/vendor/cget/pkg/boost-ext__ut/install/include/boost/ut.hpp +++ b/tests/vendor/cget/pkg/boost-ext__ut/install/include/boost/ut.hpp @@ -19,6 +19,12 @@ export import std; #endif #include +#if defined(_MSC_VER) + #pragma push_macro("min") + #pragma push_macro("max") + #undef min + #undef max +#endif // Before libc++ 17 had experimental support for format and it required a // special build flag. Currently libc++ has not implemented all C++20 chrono // improvements. Therefore doesn't define __cpp_lib_format, instead query the @@ -51,7 +57,7 @@ export import std; #elif not defined(__cpp_static_assert) #error "[Boost::ext].UT requires support for static assert"; #else -#define BOOST_UT_VERSION 2'0'0 +#define BOOST_UT_VERSION 2'0'1 #if defined(__has_builtin) and defined(__GNUC__) and (__GNUC__ < 10) and \ not defined(__clang__) @@ -103,7 +109,7 @@ struct _unique_name_for_auto_detect_prefix_and_suffix_lenght_0123456789_struct { }; BOOST_UT_EXPORT -namespace boost::inline ext::ut::inline v2_0_0 { +namespace boost::inline ext::ut::inline v2_0_1 { namespace utility { template class function; @@ -467,7 +473,7 @@ constexpr auto is_valid(...) -> bool { } template -inline constexpr auto is_container_v = +inline constexpr auto is_range_v = is_valid([](auto t) -> decltype(t.begin(), t.end(), void()) {}); template @@ -1345,7 +1351,7 @@ class printer { template and - type_traits::is_container_v> = 0> + type_traits::is_range_v> = 0> auto& operator<<(T&& t) { *this << '{'; auto first = true; @@ -2606,12 +2612,12 @@ namespace operators { return detail::neq_{lhs, rhs}; } -template > = 0> +template > = 0> [[nodiscard]] constexpr auto operator==(T&& lhs, T&& rhs) { return detail::eq_{static_cast(lhs), static_cast(rhs)}; } -template > = 0> +template > = 0> [[nodiscard]] constexpr auto operator!=(T&& lhs, T&& rhs) { return detail::neq_{static_cast(lhs), static_cast(rhs)}; } @@ -2704,23 +2710,24 @@ template } template > = 0> + type_traits::requires_t> = 0> [[nodiscard]] constexpr auto operator|(const F& f, const T& t) { return [f, t](const auto name) { for (const auto& arg : t) { - detail::on(events::test{.type = "test", - .name = name, - .tag = {}, - .location = {}, - .arg = arg, - .run = f}); + detail::on(events::test{ + .type = "test", + .name = name, + .tag = {}, + .location = {}, + .arg = arg, + .run = f}); } }; } template < class F, template class T, class... Ts, - type_traits::requires_t>> = 0> + type_traits::requires_t>> = 0> [[nodiscard]] constexpr auto operator|(const F& f, const T& t) { return [f, t](const auto name) { apply( @@ -3269,7 +3276,7 @@ using operators::operator not; using operators::operator|; using operators::operator/; using operators::operator>>; -} // namespace boost::inline ext::ut::inline v2_0_0 +} // namespace boost::inline ext::ut::inline v2_0_1 #if (defined(__GNUC__) || defined(__clang__) || defined(__INTEL_COMPILER)) && \ !defined(__EMSCRIPTEN__) @@ -3282,4 +3289,9 @@ __attribute__((constructor)) inline void cmd_line_args(int argc, // For MSVC, largc/largv are initialized with __argc/__argv #endif +#if defined(_MSC_VER) + #pragma pop_macro("min") + #pragma pop_macro("max") +#endif + #endif