Alan Johnson said:
$ CC -V
CC: Sun WorkShop 6 update 2 C++ 5.3 2001/05/15
$ CC test.cpp
"test.cpp", line 12: Error: Could not find a match for Foo::foo<Foo::T>().
1 Error(s) detected.
Sun's workshop 5.3 is already quite dated, so I'm not too surprised that it
has problems with this rather tricky thing.
Visual Studio.NET appears to have no problem with it, however.
Which version are you refering to. My VS.NET 7.1 (compiler build 13.10.3077)
chokes on it, although IMHO Victor's program is well-formed. However, I
recall that the same problem appeared already about three years ago and the
MS compiler still seems incapable of handling this, which might be due to
their deduction mechanism.
Probably Daveed or another in-depth-template guru could shed some light on
this?
Cheers
Chris