#ifndef CORE_TYPE_TRAITS_HPP #define CORE_TYPE_TRAITS_HPP #include #include #include #include namespace core { inline namespace v2 { namespace impl { /* union used for variant and implementing aligned_union, which is * not provided by gcc 4.8.x, but is provided by clang. (aligned_union_t is * the only alias missing from ) */ template union discriminate; template <> union discriminate<> { }; template union discriminate { T value; discriminate rest; }; } /* namespace impl */ /* custom type traits and types */ template using identity_t = typename meta::identity::type; template using identity = meta::identity; /* extracts the class of a member function ponter */ template using class_of_t = impl::class_of_t; template using class_of = impl::class_of; template <::std::size_t I, class T> using tuple_element_t = typename ::std::tuple_element::type; template using tuple_size_t = typename ::std::tuple_size::type; /* Implementation of N4389 */ template using bool_constant = ::std::integral_constant; template struct conjunction; template struct disjunction; template struct negation; template struct conjunction : bool_constant::value> { }; template <> struct conjunction<> : ::std::true_type { }; template struct disjunction : bool_constant::value> { }; template <> struct disjunction<> : ::std::false_type { }; template struct negation : bool_constant::value> { }; template <> struct negation<> : ::std::false_type { }; /* C++ Library Fundamentals V2 TS detection idiom */ template using void_t = meta::deduce; struct nonesuch { nonesuch (nonesuch const&) = delete; nonesuch () = delete; ~nonesuch () = delete; void operator = (nonesuch const&) = delete; }; template class U, class... Args> using detected_or = impl::make_detect; template