[clang] [Clang][Sema] Diagnose variable template explicit specializations with storage-class-specifiers (PR #93873)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 1 05:14:21 PDT 2024
alexfh wrote:
There's more (https://gcc.godbolt.org/z/YKKah8M1n):
```
class D {
template <unsigned N>
static constexpr int kMaxUnsignedInt = 2 * kMaxUnsignedInt<N - 1> + 1;
template <>
constexpr auto kMaxUnsignedInt<1> = 1;
};
```
fails to compile with
```
<source>:14:11: error: 'auto' not allowed in non-static class member
14 | constexpr auto kMaxUnsignedInt<1> = 1;
| ^~~~
```
https://github.com/llvm/llvm-project/pull/93873
More information about the cfe-commits
mailing list