C++11では、typenameの制限が一部緩和されました。
緩和の内容は「テンプレートの外でもtypenameを付けてよくなった」です。
なので、以下のコードはコンパイルが通ります。
#include <vector> int main() { typename std::vector<int>::iterator it; }
これは、テンプレートの内外でコードの書き方が変わってしまう問題への対処です。
参照:
382. Allow typename outside of templates
なお、template限定子も同様にテンプレート外で使える仕様になったのですが、現状GCC 4.7とClang 3.1では対応されていないようです。
468. Allow ::template outside of templates
追記:
id:Flastさんから追加情報をいただきました。GCC 4.8とClang 3.2から、テンプレート限定子もテンプレート外で使用できるそうです。