Skip to content

Instantly share code, notes, and snippets.

@orbekk
Created May 23, 2011 18:11
Show Gist options
  • Save orbekk/987194 to your computer and use it in GitHub Desktop.
Save orbekk/987194 to your computer and use it in GitHub Desktop.
C++ template question
#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