7 #ifndef _QI_TYPE_TRAITS_HPP_
8 #define _QI_TYPE_TRAITS_HPP_
10 #include <type_traits>
17 using True = std::true_type;
20 template<
typename A,
typename B>
21 using Equal =
typename std::is_same<A, B>::type;
30 template<
typename Ret,
typename C,
typename... Arg>
33 using type = Ret (C::*)(Arg...);
36 template<
typename Ret,
typename C,
typename... Arg>
39 using type = Ret (C::*)(Arg...);
42 template<
typename Ret,
typename C,
typename... Arg>
45 using type = Ret (C::*)(Arg...);
56 using RemoveRef =
typename std::remove_reference<A>::type;
69 static True test(decltype(&B::operator(), 0));
74 using type = decltype(test<A>(0));
99 template<
typename Ret,
typename C,
typename... Arg>
104 typedef Ret (type)(Arg...);
112 template<
typename Ret,
typename... Arg>
117 typedef Ret (type)(Arg...);
120 template<
typename Ret,
typename... Arg>
125 typedef Ret (type)(Arg...);
138 #endif // _QITYPE_TYPETRAITS_HPP_
typename std::is_same< A, B >::type Equal
static True test(decltype(&B::operator(), 0))
decltype(test< A >(0)) type
typename detail::IsFunctionObjectImpl< A >::type IsFunctionObject
typename detail::FunctionImpl< A >::type Function
typename std::remove_reference< A >::type RemoveRef
Remove reference (normal reference and r-value reference).
RemoveCv< RemoveRef< A >> RemoveCvRef
typename detail::HasMemberOperatorCallImpl< A >::type HasMemberOperatorCall
typename detail::RemoveCvImpl< A >::type RemoveCv