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