Skip to content

Instantly share code, notes, and snippets.

@SergNikitin
Last active August 29, 2015 13:56
Show Gist options
  • Save SergNikitin/8804955 to your computer and use it in GitHub Desktop.
Save SergNikitin/8804955 to your computer and use it in GitHub Desktop.
template class inheritance question
// class derived_class;
class main_class {
public:
derived_class foo(); // error: ‘derived_class’ does not name a type
};
derived_class main_class::foo() {} // error: ‘derived_class’ does not name a type
template <typename T>
class template_class {};
class derived_class : public template_class<int> {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment