12#ifndef ROOT_TypeTraits
13#define ROOT_TypeTraits
24template <
typename... Types>
26 static constexpr std::size_t
list_size =
sizeof...(Types);
31template <
typename T>
constexpr auto HasCallOp(
int ) ->
decltype(&T::operator(),
true) {
return true; }
32template <
typename T>
constexpr bool HasCallOp(
char ) {
return false; }
35template <typename T, bool HasCallOp = ROOT::Detail::HasCallOp<T>(0)>
47template <
typename R,
typename T,
typename... Args>
55template <
typename R,
typename T,
typename... Args>
63template <
typename R,
typename... Args>
71template <
typename R,
typename... Args>
83class IsSmartOrDumbPtr :
public std::integral_constant<bool, std::is_pointer<T>::value> {
91class IsSmartOrDumbPtr<std::unique_ptr<P>> :
public std::true_type {
97 std::is_integral<T>::value &&
98 std::is_signed<T>::value &&
99 !std::is_same<T, char>::value
105 std::is_integral<T>::value &&
106 !std::is_signed<T>::value &&
107 !std::is_same<T, char>::value
122template <
typename T,
typename... Rest>
127template <
typename... Types>
132template <
typename T,
typename... Rest>
137template <
typename... Args>
149template <
template <
typename...>
class Template,
typename T,
typename... Rest>
163template <
typename T,
template <
typename...>
class U,
typename... Rest>
174 template <
typename V>
175 using Begin_t =
typename V::const_iterator (V::*)() const;
177 template <
typename V>
178 using End_t =
typename V::const_iterator (V::*)() const;
180 template <
typename V>
187 template <
typename V>
193 static constexpr bool const value = Check<T>(0);
typedef void(GLAPIENTRYP _GLUfuncptr)(void)
#define R(a, b, c, d, e, f, g, h, i)
typename TakeFirstParameter< T >::type TakeFirstParameter_t
typename RemoveFirst< Args... >::type RemoveFirst_t
std::is_floating_point< T > IsFloatNumeral
Checks for floating point types (that are not characters)
typename TakeFirstType< Types... >::type TakeFirstType_t
typename RemoveFirstParameter< T >::type RemoveFirstParameter_t
constexpr auto HasCallOp(int) -> decltype(&T::operator(), true)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
typename CallableTraitsImpl< decltype(&T::operator())>::arg_types arg_types
typename CallableTraitsImpl< decltype(&T::operator())>::arg_types_nodecay arg_types_nodecay
typename CallableTraitsImpl< decltype(&T::operator())>::ret_type ret_type
Extract types from the signature of a callable object. See CallableTraits.
typename V::const_iterator(V::*)() const Begin_t
static constexpr bool Check(...)
static constexpr auto Check(int) -> decltype(static_cast< Begin_t< V > >(&V::begin), static_cast< End_t< V > >(&V::end), true)
typename V::const_iterator(V::*)() const End_t
static constexpr bool const value
Checks for signed integers types that are not characters.
Checks for unsigned integer types that are not characters.
Remove first of possibly many template parameters.
Return first of possibly many template parameters.
Lightweight storage for a collection of types.
static constexpr std::size_t list_size