Skip to content

Commit

Permalink
Update vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Mar 21, 2024
1 parent a97e3b6 commit 1525472
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions tests/vendor/cget/pkg/boost-ext__ut/install/include/boost/ut.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ export import std;
#endif

#include <version>
#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
Expand Down Expand Up @@ -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__)
Expand Down Expand Up @@ -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>
class function;
Expand Down Expand Up @@ -467,7 +473,7 @@ constexpr auto is_valid(...) -> bool {
}

template <class T>
inline constexpr auto is_container_v =
inline constexpr auto is_range_v =
is_valid<T>([](auto t) -> decltype(t.begin(), t.end(), void()) {});

template <class T>
Expand Down Expand Up @@ -1345,7 +1351,7 @@ class printer {

template <class T,
type_traits::requires_t<not type_traits::has_user_print<T> and
type_traits::is_container_v<T>> = 0>
type_traits::is_range_v<T>> = 0>
auto& operator<<(T&& t) {
*this << '{';
auto first = true;
Expand Down Expand Up @@ -2606,12 +2612,12 @@ namespace operators {
return detail::neq_{lhs, rhs};
}

template <class T, type_traits::requires_t<type_traits::is_container_v<T>> = 0>
template <class T, type_traits::requires_t<type_traits::is_range_v<T>> = 0>
[[nodiscard]] constexpr auto operator==(T&& lhs, T&& rhs) {
return detail::eq_{static_cast<T&&>(lhs), static_cast<T&&>(rhs)};
}

template <class T, type_traits::requires_t<type_traits::is_container_v<T>> = 0>
template <class T, type_traits::requires_t<type_traits::is_range_v<T>> = 0>
[[nodiscard]] constexpr auto operator!=(T&& lhs, T&& rhs) {
return detail::neq_{static_cast<T&&>(lhs), static_cast<T&&>(rhs)};
}
Expand Down Expand Up @@ -2704,23 +2710,24 @@ template <class Test>
}

template <class F, class T,
type_traits::requires_t<type_traits::is_container_v<T>> = 0>
type_traits::requires_t<type_traits::is_range_v<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<F>(events::test<F, typename T::value_type>{.type = "test",
.name = name,
.tag = {},
.location = {},
.arg = arg,
.run = f});
detail::on<F>(events::test<F, decltype(arg)>{
.type = "test",
.name = name,
.tag = {},
.location = {},
.arg = arg,
.run = f});
}
};
}

template <
class F, template <class...> class T, class... Ts,
type_traits::requires_t<not type_traits::is_container_v<T<Ts...>>> = 0>
type_traits::requires_t<not type_traits::is_range_v<T<Ts...>>> = 0>
[[nodiscard]] constexpr auto operator|(const F& f, const T<Ts...>& t) {
return [f, t](const auto name) {
apply(
Expand Down Expand Up @@ -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__)
Expand All @@ -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

0 comments on commit 1525472

Please sign in to comment.