9 #ifndef LIBPMEMOBJ_CPP_TEMPLATE_HELPERS_HPP
10 #define LIBPMEMOBJ_CPP_TEMPLATE_HELPERS_HPP
12 #include <type_traits>
23 template <
typename... Ts>
27 template <
typename... Ts>
28 using void_t =
typename make_void<Ts...>::type;
32 template <
typename T,
typename,
template <
typename>
class... Checks>
33 struct supports_impl {
34 using type = std::false_type;
36 template <
typename T,
template <
typename>
class... Checks>
37 struct supports_impl<T, void_t<Checks<T>...>, Checks...> {
38 using type = std::true_type;
41 template <
typename T,
template <
typename>
class... Checks>
42 using supports =
typename supports_impl<T, void, Checks...>::type;
44 template <
typename Compare>
45 using is_transparent =
typename Compare::is_transparent;
47 template <
typename Compare>
48 using has_is_transparent = detail::supports<Compare, is_transparent>;
53 struct is_string : std::false_type {
56 template <
typename CharT,
typename Traits>
57 struct is_string<obj::basic_string<CharT, Traits>> : std::true_type {
60 template <
typename CharT,
typename Traits>
61 struct is_string<obj::experimental::basic_inline_string<CharT, Traits>>