https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116928

            Bug ID: 116928
           Summary: Error on NTTP with '>' in braced default
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: eczbek.void at gmail dot com
  Target Milestone: ---

This causes an error:



```
template<int = { 0 > 0 }>
int x;
```



<source>:1:20: error: expected '}' before '>' token
    1 | template<int = { 0 > 0 }>
      |                ~   ^
<source>:1:20: note: probably missing a comma or an operator before
Compiler returned: 1



Compiler Explorer link: <https://godbolt.org/z/h4djxPdqM>

This code compiles fine with Clang and MSVC
  • [Bug c++/116928] New: Error on N... eczbek.void at gmail dot com via Gcc-bugs

Reply via email to