fork download
  1. #include <vector>
  2. #include <array>
  3. template <typename T >
  4. struct Foo {
  5. typedef typename std::vector<T>::iterator Iterator;
  6.  
  7. inline void bar( const Iterator& it ) const;
  8.  
  9. std::vector<T> vec;
  10. };
  11.  
  12. // Compiles fine without "typename"...
  13. template <typename T>
  14. inline void Foo<T>::bar( const typename Foo<T>::Iterator& it ) const {}
  15.  
  16. int main() {
  17. Foo<float> f;
  18. f.bar( f.vec.begin() );
  19. return 0;
  20. }
Success #stdin #stdout 0s 3408KB
stdin
Standard input is empty
stdout
Standard output is empty