@@ -19,6 +19,12 @@ export import std;
19
19
#endif
20
20
21
21
#include < version>
22
+ #if defined(_MSC_VER)
23
+ #pragma push_macro("min")
24
+ #pragma push_macro("max")
25
+ #undef min
26
+ #undef max
27
+ #endif
22
28
// Before libc++ 17 had experimental support for format and it required a
23
29
// special build flag. Currently libc++ has not implemented all C++20 chrono
24
30
// improvements. Therefore doesn't define __cpp_lib_format, instead query the
@@ -51,7 +57,7 @@ export import std;
51
57
#elif not defined(__cpp_static_assert)
52
58
#error "[Boost::ext].UT requires support for static assert";
53
59
#else
54
- #define BOOST_UT_VERSION 2'0'0
60
+ #define BOOST_UT_VERSION 2'0'1
55
61
56
62
#if defined(__has_builtin) and defined(__GNUC__) and (__GNUC__ < 10) and \
57
63
not defined (__clang__)
@@ -103,7 +109,7 @@ struct _unique_name_for_auto_detect_prefix_and_suffix_lenght_0123456789_struct {
103
109
};
104
110
105
111
BOOST_UT_EXPORT
106
- namespace boost ::inline ext::ut::inline v2_0_0 {
112
+ namespace boost ::inline ext::ut::inline v2_0_1 {
107
113
namespace utility {
108
114
template <class >
109
115
class function ;
@@ -467,7 +473,7 @@ constexpr auto is_valid(...) -> bool {
467
473
}
468
474
469
475
template <class T >
470
- inline constexpr auto is_container_v =
476
+ inline constexpr auto is_range_v =
471
477
is_valid<T>([](auto t) -> decltype (t.begin(), t.end(), void()) {});
472
478
473
479
template <class T >
@@ -1345,7 +1351,7 @@ class printer {
1345
1351
1346
1352
template <class T ,
1347
1353
type_traits::requires_t <not type_traits::has_user_print<T> and
1348
- type_traits::is_container_v <T>> = 0 >
1354
+ type_traits::is_range_v <T>> = 0 >
1349
1355
auto & operator <<(T&& t) {
1350
1356
*this << ' {' ;
1351
1357
auto first = true ;
@@ -2606,12 +2612,12 @@ namespace operators {
2606
2612
return detail::neq_{lhs, rhs};
2607
2613
}
2608
2614
2609
- template <class T , type_traits::requires_t <type_traits::is_container_v <T>> = 0 >
2615
+ template <class T , type_traits::requires_t <type_traits::is_range_v <T>> = 0 >
2610
2616
[[nodiscard]] constexpr auto operator ==(T&& lhs, T&& rhs) {
2611
2617
return detail::eq_{static_cast <T&&>(lhs), static_cast <T&&>(rhs)};
2612
2618
}
2613
2619
2614
- template <class T , type_traits::requires_t <type_traits::is_container_v <T>> = 0 >
2620
+ template <class T , type_traits::requires_t <type_traits::is_range_v <T>> = 0 >
2615
2621
[[nodiscard]] constexpr auto operator !=(T&& lhs, T&& rhs) {
2616
2622
return detail::neq_{static_cast <T&&>(lhs), static_cast <T&&>(rhs)};
2617
2623
}
@@ -2704,23 +2710,24 @@ template <class Test>
2704
2710
}
2705
2711
2706
2712
template <class F , class T ,
2707
- type_traits::requires_t <type_traits::is_container_v <T>> = 0 >
2713
+ type_traits::requires_t <type_traits::is_range_v <T>> = 0 >
2708
2714
[[nodiscard]] constexpr auto operator |(const F& f, const T& t) {
2709
2715
return [f, t](const auto name) {
2710
2716
for (const auto & arg : t) {
2711
- detail::on<F>(events::test<F, typename T::value_type>{.type = " test" ,
2712
- .name = name,
2713
- .tag = {},
2714
- .location = {},
2715
- .arg = arg,
2716
- .run = f});
2717
+ detail::on<F>(events::test<F, decltype (arg)>{
2718
+ .type = " test" ,
2719
+ .name = name,
2720
+ .tag = {},
2721
+ .location = {},
2722
+ .arg = arg,
2723
+ .run = f});
2717
2724
}
2718
2725
};
2719
2726
}
2720
2727
2721
2728
template <
2722
2729
class F , template <class ...> class T , class ... Ts,
2723
- type_traits::requires_t <not type_traits::is_container_v <T<Ts...>>> = 0 >
2730
+ type_traits::requires_t <not type_traits::is_range_v <T<Ts...>>> = 0 >
2724
2731
[[nodiscard]] constexpr auto operator |(const F& f, const T<Ts...>& t) {
2725
2732
return [f, t](const auto name) {
2726
2733
apply (
@@ -3269,7 +3276,7 @@ using operators::operator not;
3269
3276
using operators::operator |;
3270
3277
using operators::operator /;
3271
3278
using operators::operator >>;
3272
- } // namespace boost::inline ext::ut::inline v2_0_0
3279
+ } // namespace boost::inline ext::ut::inline v2_0_1
3273
3280
3274
3281
#if (defined(__GNUC__) || defined(__clang__) || defined(__INTEL_COMPILER)) && \
3275
3282
!defined(__EMSCRIPTEN__)
@@ -3282,4 +3289,9 @@ __attribute__((constructor)) inline void cmd_line_args(int argc,
3282
3289
// For MSVC, largc/largv are initialized with __argc/__argv
3283
3290
#endif
3284
3291
3292
+ #if defined(_MSC_VER)
3293
+ #pragma pop_macro("min")
3294
+ #pragma pop_macro("max")
3295
+ #endif
3296
+
3285
3297
#endif
0 commit comments