Skip to content

Instantly share code, notes, and snippets.

@jorendorff
Created December 1, 2015 21:49
Show Gist options
  • Select an option

  • Save jorendorff/de7cf2b24be8fd45a535 to your computer and use it in GitHub Desktop.

Select an option

Save jorendorff/de7cf2b24be8fd45a535 to your computer and use it in GitHub Desktop.
// A class template that can't be successfully instantiated.
template <typename X>
struct Foo {
X data;
Foo<X> badIdea; // error: incomplete type
};
struct T { int x; };
typedef Foo<T> FooT;
int main() { return 0; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment