Issue 153445
Summary Default arguments followed by ellipsis not allowed in in-class function declarations
Labels new issue
Assignees
Reporter ckwastra
    Test code ([CE](https://godbolt.org/z/sonKejdv1)):

```cpp
void f(int = {}...); // OK

struct S {
  void f(int = {}...); // Clang: error: unexpected end of default
                       // argument _expression_
  void g(int...); // OK
};

void S::g(int = {}...) {} // OK
```

As shown above, this syntax compiles fine for function declarations outside the class, but not for in-class ones. This is inconsistent behavior.

_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to