Closed
Description
Bugzilla Link | 38299 |
Resolution | DUPLICATE |
Resolved on | Aug 16, 2018 07:52 |
Version | trunk |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
CC | @dwblaikie,@DougGregor,@zygoloid,@steveire |
Extended Description
This example fails to compile on the marked line, but nothing here is dependent.
struct X {
template
void foo();
};
struct Base {
X get();
};
template
struct Derived : Base
{
void foo() {
auto result = Base::get();
result.foo(); // (*)
}
};
template struct Derived;
The error message is:
error: use 'template' keyword to treat 'foo' as a dependent template name
result.foo(); // (*)
^
template
1 error generated.
BTW, g++ accepts the code.