Search code examples
c++ellipsis

All uses of Ellipsis in C++


Currently, I could recollect only three uses of ... in C++:

  1. variadic functions
  2. variadic templates
  3. catch block

I tried different ways of googling "all uses of ellipsis in C++" but failed to find it. I am focussing on the current standard of C++.


Solution

  • That's pretty much it, besides variadic macros mentioned in the comments. I made a grouped tree list:

    • Variadic
      • Template parameter packs
        • Template parameter delcaration
        • Function parameter declaration
        • Parameter pack expansions (these can be in many contexts)
          • Plain variadic expansion (can be used in declarations)
          • Fold expressions
          • Variadic sizeof
      • C style variadic parameters
      • Variadic macros
    • Catch all