I was looking at my headers (g++-4.5.2) for the implementations of some templates in , and I found the following:
/// is_function
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......)>
: public true_type { };
The first two declarations seem reasonable, but I can't figure out how the third works. What is ......
? I looked for it in the standard, and couldn't find anything.
It's the same as:
_Res(_ArgTypes..., ...)
The comma before an ellipses parameter is optional.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With