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

            Bug ID: 125536
           Summary: T[N] not substituted when N >= 2^31
           Product: gcc
           Version: 17.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: ---

https://godbolt.org/z/MGhbffbr5
Clang accepts

```
template<typename>
constexpr bool x = false;

template<unsigned long long N>
constexpr bool x<char[N]> = true;

static_assert(x<char[2147483647]>);
static_assert(x<char[2147483648]>);
```

```
<source>:8:15: error: static assertion failed
    8 | static_assert(x<char[2147483648]>);
      |               ^~~~~~~~~~~~~~~~~~~
```
  • [Bug c++/125536] New: T[N] ... eczbek.void at gmail dot com via Gcc-bugs

Reply via email to