Last active
August 29, 2015 13:56
-
-
Save SergNikitin/8804955 to your computer and use it in GitHub Desktop.
template class inheritance question
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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