G ++ std :: is_function implementation: what is _ArgTypes ......?

I looked at my headers (g ++ - 4.5.2) to implement some templates, 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 announcements seem reasonable, but I can't figure out how the third works. What is ...... ? I searched for it in the standard and found nothing.

+8
c ++ c ++ 11 templates g ++ variadic-templates
source share
1 answer

This is the same as:

 _Res(_ArgTypes..., ...) 

A comma before an ellipse parameter is optional.

+6
source share

All Articles