warning: inline function '(...)' is not defined (even though it is) #37522
Closed
Description
| Bugzilla Link | 38174 |
| Version | trunk |
| OS | Linux |
| CC | @dwblaikie,@DougGregor |
Extended Description
Hello,
class A {
template <char N>
struct Foo {
static constexpr char Bar() { return 0; }
};
using Constants = Foo<1>;
char var = Constants::Bar();
};$ clang++ -std=c++17 -c bug.cpp
bug.cpp:4:27: warning: inline function 'A::Foo<'\x01'>::Bar' is not defined [-Wundefined-inline]
static constexpr char Bar() { return 0; }
^
bug.cpp:9:25: note: used here
char var = Constants::Bar();
^
1 warning generated.
This warning shouldn't be here, should it? Originally discovered with clang-6, but I've also checked ToT and that also issues a warning. Could be somewhat related to 18781, but that particular problem seems to be fixed.
Activity