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);
197template <
typename F,
typename... Args>
198#ifdef __cpp_lib_is_invocable
199using InvokeResult_t = std::invoke_result_t<
F, Args...>;
#define R(a, b, c, d, e, f, g, h, i)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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)
std::result_of_t< F(Args...)> InvokeResult_t
An adapter for std::invoke_result that falls back to std::result_of if the former is not available.
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