| Issue |
114076
|
| Summary |
C++ static constexpr class variables considered 'invalid' as template arguments
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
mld2443
|
https://godbolt.org/z/WY54brjqY
```cpp
struct A {
static constexpr int VALUE = 42;
template <int ARG>
constexpr int bar() const {
return ARG;
}
constexpr int foo() const {
return this->template bar<this->VALUE>();
}
};
static_assert(A{}.foo()==42);
```
This code compiles with every version of GCC I tried, but I cannot get it to compile with clang at all.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs