Possible Duplicate:
What is the meaning of “… …” token?
While looking through libc++'s header <type_traits>
, I stumbled upon these class template specializations:
template<typename>
struct is_function
: public false_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes...)>
: public true_type { };
template<typename _Res, typename... _ArgTypes>
struct is_function<_Res(_ArgTypes......)> // <-- Huh?
: public true_type { };
There's three more pairs of specializations (const
, volatile
and const volatile
variations), all in the same fashion.
It looks like two elipsis operators grouped together. The only mention of this I could find is on cplusplus.com, where it says it can be also written with a space (_ArgTypes... ...
) or a comma (_ArgTypes..., ...
) but provides no explanation about what it means.
So, what does this syntax mean? What is the purpose of a specialization like this?