Since there is a restriction on allowed non-type variadic templates, I am trying to write a function taking an arbitrary number of doubles using enable_if
. In essen
Here is another (c++11) version (heavily inspired by the T.C.'s one above):
#include
template
struct are_all_convertible {
constexpr static bool value = std::is_convertible::value &&
are_all_convertible::value;
};
template
struct are_all_convertible {
constexpr static bool value = std::is_convertible::value;
};
template::value>::type>
foo(T... t){ /* code here */}