https://bugs.llvm.org/show_bug.cgi?id=49148
Bug ID: 49148
Summary: Default template parameter value from
brace-initialization
Product: clang
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: tom...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
Clang does not allow brace-initialization in default value of template
parameter. I hope I used the right terminology.
Example:
template <int I = {}> void foo(int i = {});
error: expected expression
Default value of the function parameter is accepted, but the template one is
not.
I did not figure out whether this is covered in the standard, however I think
that the current state is inconsistent (is it alright for function, but not for
template).
(Works in GCC.)
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs