14# if __has_include( <experimental/type_traits> )
15# include <experimental/type_traits>
16# define have_experimental_type_traits
23#ifdef have_experimental_type_traits
25template <
template <
class...>
class Op,
class... Args>
26using is_detected =
typename std::experimental::is_detected<Op, Args...>;
28template <
template <
class...>
class Op,
class... Args>
29using detected_t =
typename std::experimental::detected_t<Op, Args...>;
31template <
class Default,
template <
class...>
class Op,
class... Args>
32using detected_or =
typename std::experimental::detected_or<Default, Op, Args...>;
38template <
class Default,
class AlwaysVoid,
template <
class...>
class Op,
class... Args>
44template <
class Default,
template <
class...>
class Op,
class... Args>
45struct detector<Default,
std::void_t<Op<Args...>>, Op, Args...> {
47 using type = Op<Args...>;
53 nonesuch( nonesuch
const& ) =
delete;
54 void operator=( nonesuch
const& ) =
delete;
57template <
template <
class...>
class Op,
class... Args>
58using is_detected =
typename detail::detector<nonesuch, void, Op, Args...>::value_t;
60template <
template <
class...>
class Op,
class... Args>
61using detected_t =
typename detail::detector<nonesuch, void, Op, Args...>::type;
63template <
class Default,
template <
class...>
class Op,
class... Args>
64using detected_or = detail::detector<Default, void, Op, Args...>;
hepler function to manage enum as underlying types in VariableSet