以下无法对其进行编译(在Linux的gcc 4.2.1,反正): template< typename T >
class Foo
{
public:
typedef int FooType;
};
void
ordinary()
{
Foo<int>::FooType bar = 0;
}
template< typename T >
void
te
可能重复: Why do I need to use typedef typename in g++ but not VS? 你好,最近我占与VC++代码移植到GCC /英特尔的 “简单问题”。 的代码编译W/O错误在VC++: #include <vector>
using std::vector;
template <class T>
void test_vec(std::vector