5 #ifndef GKO_PUBLIC_CORE_BASE_STD_EXTENSIONS_HPP_
6 #define GKO_PUBLIC_CORE_BASE_STD_EXTENSIONS_HPP_
12 #include <type_traits>
14 #include "ginkgo/core/base/types.hpp"
33 template <
typename... Ts>
46 template <
typename... Ts>
47 using void_t =
typename detail::make_void<Ts...>::type;
50 GKO_DEPRECATED(
"use std::uncaught_exceptions")
51 inline
bool uncaught_exception() noexcept
53 return std::uncaught_exceptions() > 0;
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);
104 template <
class... Ts>
105 using conjunction = std::conjunction<Ts...>;
112 #endif // GKO_PUBLIC_CORE_BASE_STD_EXTENSIONS_HPP_