9 #ifndef LIBPMEMOBJ_CPP_TEMPLATE_HELPERS_HPP
10 #define LIBPMEMOBJ_CPP_TEMPLATE_HELPERS_HPP
12 #include <type_traits>
20 template <
typename... Ts>
24 template <
typename... Ts>
25 using void_t =
typename make_void<Ts...>::type;
29 template <
typename T,
typename,
template <
typename>
class... Checks>
30 struct supports_impl {
31 using type = std::false_type;
33 template <
typename T,
template <
typename>
class... Checks>
34 struct supports_impl<T, void_t<Checks<T>...>, Checks...> {
35 using type = std::true_type;
38 template <
typename T,
template <
typename>
class... Checks>
39 using supports =
typename supports_impl<T, void, Checks...>::type;
41 template <
typename Compare>
42 using is_transparent =
typename Compare::is_transparent;
44 template <
typename Compare>
45 using has_is_transparent = detail::supports<Compare, is_transparent>;