Boost logo

Boost :

From: Samuel Krempp (krempp_at_[hidden])
Date: 2005-02-24 13:37:45


As I said in the thread in [boost-users] about "using boost::format with STLPort"
( <421CC3D6.4010600_at_[hidden]> ), 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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk