Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4265650
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:39:11+00:00 2026-05-21T06:39:11+00:00

While browsing through gcc’s current implementation of new C++11 headers, I stumbled upon "……"

  • 0

While browsing through gcc’s current implementation of new C++11 headers, I stumbled upon "……" token. You can check, that the following code compiles fine [via godbolt.org].

template <typename T>
struct X
{ /* ... */ };

template <typename T, typename ... U>
struct X<T(U......)> // this line is the important one
{ /* ... */ };

So, what is the meaning of this token?

edit: Looks like SO trimmed "……" in question title to "…", I did really mean "……" . 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:39:11+00:00Added an answer on May 21, 2026 at 6:39 am

    Every instance of that oddity is paired with a case of a regular single ellipsis.

      template<typename _Res, typename... _ArgTypes>
        struct _Weak_result_type_impl<_Res(_ArgTypes...)>
        { typedef _Res result_type; };
    
      template<typename _Res, typename... _ArgTypes>
        struct _Weak_result_type_impl<_Res(_ArgTypes......)>
        { typedef _Res result_type; };
    
      template<typename _Res, typename... _ArgTypes>
        struct _Weak_result_type_impl<_Res(_ArgTypes...) const>
        { typedef _Res result_type; };
    
      template<typename _Res, typename... _ArgTypes>
        struct _Weak_result_type_impl<_Res(_ArgTypes......) const>
        { typedef _Res result_type; };
    

    My guess is that the double ellipsis is similar in meaning to _ArgTypes..., ..., i.e. a variadic template expansion followed by a C-style varargs list.

    Here’s a test supporting that theory… I think we have a new winner for worst pseudo-operator ever.

    Edit: This does appear to be conformant. §8.3.5/3 describes one way to form the parameter list as

    parameter-declaration-listopt …opt

    So the double-ellipsis is formed by a parameter-declaration-list ending with a parameter pack, followed by another ellipsis.

    The comma is purely optional; §8.3.5/4 does say

    Where syntactically correct and where “…” is not part of an abstract-declarator, “, …” is synonymous with “…”.

    This is within an abstract-declarator, [edit] but Johannes makes a good point that they are referring to an abstract-declarator within a parameter-declaration. I wonder why they didn’t say “part of a parameter-declaration,” and why that sentence isn’t just an informative note…

    Furthermore, va_begin() in <cstdarg> requires a parameter before the varargs list, so the prototype f(...) specifically allowed by C++ is useless. Cross-referencing with C99, it is illegal in plain C. So, this is most bizarre.

    Usage note

    By request, here is a demonstration of the double ellipsis:

    #include <cstdio>
    #include <string>
    
    template< typename T >
    T const &printf_helper( T const &x )
        { return x; }
    
    char const *printf_helper( std::string const &x )
        { return x.c_str(); }
    
    template< typename ... Req, typename ... Given >
    int wrap_printf( int (*fn)( Req... ... ), Given ... args ) {
        return fn( printf_helper( args ) ... );
    }
    
    int main() {
        wrap_printf( &std::printf, "Hello %s\n", std::string( "world!" ) );
        wrap_printf( &std::fprintf, stderr, std::string( "Error %d" ), 5 );
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm learning JavaScript and while browsing through the jQuery library I see : (colon)
I'm working on a PHP Client for CouchDB. While browsing through the php.net documentation
While browsing through source code in my IDE I'll sometimes wish I could see
So, I've been testing out Twitter's new Follow buttons , and while browsing ZDNet.com,
While browsing with Chrome, I noticed that it responds extremely fast (in comparison with
While browsing some code I found a call to OpenPrinter() . The code compiles
I need to set/get the cookies stored at first.example while browsing second.example , I
While going through university and from following the development of SO, I've heard a
I was browsing through Text Processing in Python and tried its example about Schwartzian
While browsing the source code of the Scala API, I met this package definition

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.