Created
July 9, 2011 23:59
-
-
Save charleskeepax/1074075 to your computer and use it in GitHub Desktop.
Embedded C++ issues.
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
template <typename T> | |
class Foo { | |
public: | |
void Get(T in) { | |
} | |
void Bar() { | |
} | |
}; | |
int main() { | |
Foo<int> test1; | |
Foo<double> test2; | |
test1.Bar(); | |
test2.Bar(); | |
return 0; | |
} |
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 Base { | |
public: | |
void Bar() { | |
} | |
}; | |
template <typename T> | |
class Foo : public Base { | |
public: | |
void Get(T in) { | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you found your way here you might want to check out the article on my blog that goes with this code: http://www.charles-keepax.co.uk/blog/CPPForEmbedded.html