template issue
chris
caj@cs.york.ac.uk
Tue Sep 14 17:13:00 GMT 2004
Darko Miletic wrote:
> I was playing around with std::for_each and std::map and came to an
> interresting problem.
> <cut stuff>
> Any ideas?
>
>
No, but I have a much smaller test case :) (remember, you can never have
too small a test case)
struct foo {
typedef int value_type;
};
template <typename T>
void print() {}
template <typename T>
void helper() {
print<foo::value_type>(); // this is fine
print<typename T::value_type>(); // this is fine
print<T::value_type>(); // This line doesn't compile
}
int main()
{
print<foo::value_type>();
helper<foo>();
}
At which point, this clearly has nothing to do with libstdc++ at all, so
this conversation should probably continue on the gcc mailing list.
More information about the Libstdc++
mailing list