5 #ifndef GKO_PUBLIC_CORE_BASE_STD_EXTENSIONS_HPP_
6 #define GKO_PUBLIC_CORE_BASE_STD_EXTENSIONS_HPP_
12 #include <type_traits>
31 template <
typename... Ts>
41 template <
typename... Ts>
42 using void_t =
typename detail::make_void<Ts...>::type;
46 inline bool uncaught_exception() noexcept
49 #if (defined(_MSVC_LANG) && _MSVC_LANG > 201402L) || __cplusplus > 201402L
50 return std::uncaught_exceptions() > 0;
52 return std::uncaught_exception();
58 template <
bool B,
typename T =
void>
59 using enable_if_t = std::enable_if_t<B, T>;
63 template <
bool B,
typename T,
typename F>
64 using conditional_t = std::conditional_t<B, T, F>;
69 using decay_t = std::decay_t<T>;
74 constexpr
bool greater(
const T&& lhs,
const T&& rhs)
76 return std::greater<void>()(lhs, rhs);
82 constexpr
bool greater_equal(
const T&& lhs,
const T&& rhs)
84 return std::greater_equal<void>()(lhs, rhs);
90 constexpr
bool less(
const T&& lhs,
const T&& rhs)
92 return std::less<void>()(lhs, rhs);
98 constexpr
bool less_equal(
const T&& lhs,
const T&& rhs)
100 return std::less_equal<void>()(lhs, rhs);
109 template <
class B1,
class... Bn>
111 : std::conditional_t<bool(B1::value), conjunction<Bn...>, B1> {};
118 #endif // GKO_PUBLIC_CORE_BASE_STD_EXTENSIONS_HPP_