
Hi, I came to expect shared_ptr to handle undefined type, but here I got a test case (simplified from my use case) where it's actually breaks under msvc and works under gcc: #include "boost/shared_ptr.hpp" class UndefinedType; //// base class for template class FooBase{ public: virtual ~FooBase(); virtual void fff(); }; template <typename T> class Foo: public FooBase { public: virtual void fff() { // any virtual implementations seen are [have to be able to be] instantiated. This fails unless T is visible. x.reset(x.get()); } private: boost::shared_ptr<T> x; }; //// now use Foo as a field in a class class User { Foo<UndefinedType> y; }; It fails with: ...\boost-1.39\boost/checked_delete.hpp(32) : error C2027: use of undefined type 'UndefinedType' Is this expected to compile? Is this MSVC issue? Gennadiy