Skip to content

Instantly share code, notes, and snippets.

@dcci
Created October 17, 2015 01:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcci/27a191c991052a1b71cb to your computer and use it in GitHub Desktop.
Save dcci/27a191c991052a1b71cb to your computer and use it in GitHub Desktop.
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