mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
🐛 std::variant should be properly gated...
This commit is contained in:
parent
f54138305d
commit
f56b3c698c
|
@ -479,21 +479,39 @@ namespace sol { namespace meta {
|
|||
template <typename T, typename U>
|
||||
class supports_op_less_test<T, U, void_t<decltype(std::declval<T&>() < std::declval<U&>())>>
|
||||
: public std::integral_constant<bool,
|
||||
!is_specialization_of_v<unqualified_t<T>, std::variant> && !is_specialization_of_v<unqualified_t<U>, std::variant>> { };
|
||||
#if SOL_IS_ON(SOL_STD_VARIANT_I_)
|
||||
!is_specialization_of_v<unqualified_t<T>, std::variant> && !is_specialization_of_v<unqualified_t<U>, std::variant>
|
||||
#else
|
||||
true
|
||||
#endif
|
||||
> {
|
||||
};
|
||||
|
||||
template <typename T, typename U, typename = void>
|
||||
class supports_op_equal_test : public std::false_type { };
|
||||
template <typename T, typename U>
|
||||
class supports_op_equal_test<T, U, void_t<decltype(std::declval<T&>() == std::declval<U&>())>>
|
||||
: public std::integral_constant<bool,
|
||||
!is_specialization_of_v<unqualified_t<T>, std::variant> && !is_specialization_of_v<unqualified_t<U>, std::variant>> { };
|
||||
#if SOL_IS_ON(SOL_STD_VARIANT_I_)
|
||||
!is_specialization_of_v<unqualified_t<T>, std::variant> && !is_specialization_of_v<unqualified_t<U>, std::variant>
|
||||
#else
|
||||
true
|
||||
#endif
|
||||
> {
|
||||
};
|
||||
|
||||
template <typename T, typename U, typename = void>
|
||||
class supports_op_less_equal_test : public std::false_type { };
|
||||
template <typename T, typename U>
|
||||
class supports_op_less_equal_test<T, U, void_t<decltype(std::declval<T&>() <= std::declval<U&>())>>
|
||||
: public std::integral_constant<bool,
|
||||
!is_specialization_of_v<unqualified_t<T>, std::variant> && !is_specialization_of_v<unqualified_t<U>, std::variant>> { };
|
||||
#if SOL_IS_ON(SOL_STD_VARIANT_I_)
|
||||
!is_specialization_of_v<unqualified_t<T>, std::variant> && !is_specialization_of_v<unqualified_t<U>, std::variant>
|
||||
#else
|
||||
true
|
||||
#endif
|
||||
> {
|
||||
};
|
||||
|
||||
template <typename T, typename U, typename = void>
|
||||
class supports_op_left_shift_test : public std::false_type { };
|
||||
|
|
Loading…
Reference in New Issue
Block a user