18 #include <type_traits>
28 void inplaceVectorFromArgs(std::vector<T>&) {
32 template <
typename T,
typename Arg,
typename... Args>
33 void inplaceVectorFromArgs(std::vector<T>& v, Arg arg, Args... args) {
35 std::is_same<T,
typename std::remove_reference<Arg>::type>::value,
36 "expected identical types");
37 v.push_back(std::forward<Arg>(arg));
38 inplaceVectorFromArgs(v, std::forward<Args>(args)...);
44 template <
typename Arg>
51 template <
typename Arg,
typename... Args>
55 std::vector<typename std::remove_reference<Arg>::type> v;
56 inplaceVectorFromArgs(v, std::forward<Arg>(arg), std::forward<Args>(args)...);
60 template <
typename Arg,
typename... Args>
63 std::vector<typename std::remove_reference<Arg>::type> v;
64 inplaceVectorFromArgs(v, static_cast<Arg>(args)...);
68 template <
template <
class>
class ConditionType,
typename T,
typename... Args>
74 template <
template <
class>
class ConditionType,
typename T>
76 const static bool value = ConditionType<T>::value;
79 template <
template <
class>
class ConditionType>
std::vector< typename std::remove_reference< Arg >::type > vectorFromCastedArgs(Args...args)
Definition: vararg.h:61
std::vector< Arg > vectorFromArgs()
Definition: vararg.h:45
static const bool value
Definition: vararg.h:70