G
Gianni Mariani
I believe the code below is compliant with the C++ standard. GCC and
Comeau compiles this code without complaint however VC++ 7.1 has a
number of silly complaints.
Are there any known work arounds ?
template <typename T>
class foo
{
public:
typedef typename T::foo_inner foo_inner;
void func(
foo_inner * foo_inner::* member
)
{
}
void func2(
typename T::foo_inner * T::foo_inner::* member
)
{
}
};
VC++ 7.1 generates the following errors.
test.cpp(11) : error C2653: 'foo<T>::foo_inner' : is not a class or
namespace name
test.cpp(7) : see declaration of 'foo<T>::foo_inner'
test.cpp(20) : see reference to class template instantiation 'foo<T>'
being compiled
test.cpp(17) : error C2653: 'foo_inner' : is not a class or namespace name
Comeau compiles this code without complaint however VC++ 7.1 has a
number of silly complaints.
Are there any known work arounds ?
template <typename T>
class foo
{
public:
typedef typename T::foo_inner foo_inner;
void func(
foo_inner * foo_inner::* member
)
{
}
void func2(
typename T::foo_inner * T::foo_inner::* member
)
{
}
};
VC++ 7.1 generates the following errors.
test.cpp(11) : error C2653: 'foo<T>::foo_inner' : is not a class or
namespace name
test.cpp(7) : see declaration of 'foo<T>::foo_inner'
test.cpp(20) : see reference to class template instantiation 'foo<T>'
being compiled
test.cpp(17) : error C2653: 'foo_inner' : is not a class or namespace name