MSVC 7.1 bug with recursive template typedefs

As I said in the thread in [boost-users] about "using boost::format with STLPort" ( <421CC3D6.4010600@crans.ens-cachan.fr> ), I've come across a bug with recent MSVC's (tested on MSVC 7.1, and apparently MSVC 8 fails the same way). Does anyone know if this is a known MSVC bug ? Or should someone report that ? The following sample causes error C2244 ("unable to match function definition to an existing declaration") template<class T> struct A { typedef T* some_type; }; template<class T> struct B { typedef typename A<T>::some_type le_type; le_type some_f(); }; template<class T> typename B<T>::le_type B<T>::some_f() { le_type x; return x; } Replacing B<T>::le_type with A<T>::some_type when defining B<T>::some_f() seems to work around the bug. Regards, -- Samuel

Samuel,
As I said in the thread in [boost-users] about "using boost::format with STLPort" ( <421CC3D6.4010600@crans.ens-cachan.fr> ), I've come across a bug with recent MSVC's (tested on MSVC 7.1, and apparently MSVC 8 fails the same way).
Does anyone know if this is a known MSVC bug ? Or should someone report that ?
<...>
Yes, this is a known bug. Alas, it seems that it was reported too late to be fixed in Whidbey. We can expect it to work properly in the next release (Orcas). http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=e... -- Pavel Kuznetsov MetaCommunications Engineering http://meta-comm.com/engineering
participants (2)
-
Pavel Kuznetsov [VC++ MVP]
-
Samuel Krempp