Created
May 23, 2011 18:11
-
-
Save orbekk/987194 to your computer and use it in GitHub Desktop.
C++ template question
This file contains hidden or 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
#include <vector> | |
using std::vector; | |
template <typename T> | |
void f() { | |
// Why is this illegal? | |
// vector<T>::iterator it; | |
// What does typename do here? | |
typename vector<T>::iterator it; | |
} | |
int main() { | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment