Hi. Is there any easy way to get a thread safe edition of the shared_ptr (BOOST_HAS_THREADS) and a "non" thread safe edition (BOOST_DISABLE_THREADS) inside the same project? The thread safe edition of the shared_ptr is a bit slower and I would like to able to use the non thread safe shared_ptr, when I known it only be used on the same thread. As a solution I thought I could do something like this, so I would not have to edit/copy any boost .hpp file : // // MyApp.cpp // #define BOOST_HAS_THREADS #include "boost/smart_ptr.hpp" namespace boost_nothread { #define BOOST_DISABLE_THREADS #include "boost/smart_ptr.hpp" } void f() { boost::shared_ptr <int> spIntTS; // thread safe smart pointer boost_nothread::shared_ptr <int> spInt; // non thread safe smart pointer } //////// The above sample does not work - what should I do instead? Regards, René