I was wondering whether … was considered an operator in C++11. And if it’s the case, what’s its precedence?
For instance consider this pretty bad example and assume ... is an operator.
template<typename T, typename...Args>
void foo(T _elm, Args... _args)
{
bar(something,_args...);
}
How can I know whether bar
will be run with its first parameter being something
and args...
expanded, or if its gonna be run on the result of operator,(something, _args...)
? (bonus question: can operators be overloaded with variadic templates ?)