// please note that this replacement implementation does not // provide the performance benefit of the original, which // makes only one allocation as opposed to two allocations // (smart pointer counter and payload) which are usually // required if object and smart pointer are constructed // independently. #ifndef INCLUDED_AI_BOOST_MAKE_SHARED #define INCLUDED_AI_BOOST_MAKE_SHARED namespace boost { template shared_ptr make_shared() { return shared_ptr(new T()); } template shared_ptr make_shared(const T0& t0) { return shared_ptr(new T(t0)); } template shared_ptr make_shared(const T0& t0, const T1& t1) { return shared_ptr(new T(t0,t1)); } template shared_ptr make_shared(const T0& t0, const T1& t1, const T2& t2) { return shared_ptr(new T(t0,t1,t2)); } template shared_ptr make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3) { return shared_ptr(new T(t0,t1,t2,t3)); } template shared_ptr make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) { return shared_ptr(new T(t0,t1,t2,t3,t4)); } template shared_ptr make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) { return shared_ptr(new T(t0,t1,t2,t3,t4,t5)); } template shared_ptr make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5, const T6& t6) { return shared_ptr(new T(t0,t1,t2,t3,t4,t5,t6)); } } #endif