Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Go home clang, you're drunk.
% cat template.cpp
template<class T>
class X {
T f(T x) { return x; }
T foo(void);
};
template<class T>
T X::foo(void)
{
return f(5);
}
% ./clang template.cpp -o template -Wall
template.cpp:9:3: error: 'X' is not a class, namespace, or enumeration
T X::foo(void)
^
template.cpp:2:7: note: 'X' declared here
class X {
^
1 error generated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.