vrshoot

annotate libs/assimp/boost/make_shared.hpp @ 2:334d17aed7de

visual studio project files
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 02 Feb 2014 18:36:38 +0200
parents
children
rev   line source
nuclear@0 1
nuclear@0 2 // please note that this replacement implementation does not
nuclear@0 3 // provide the performance benefit of the original, which
nuclear@0 4 // makes only one allocation as opposed to two allocations
nuclear@0 5 // (smart pointer counter and payload) which are usually
nuclear@0 6 // required if object and smart pointer are constructed
nuclear@0 7 // independently.
nuclear@0 8
nuclear@0 9 #ifndef INCLUDED_AI_BOOST_MAKE_SHARED
nuclear@0 10 #define INCLUDED_AI_BOOST_MAKE_SHARED
nuclear@0 11
nuclear@0 12
nuclear@0 13 namespace boost {
nuclear@0 14
nuclear@0 15 template <typename T>
nuclear@0 16 shared_ptr<T> make_shared() {
nuclear@0 17 return shared_ptr<T>(new T());
nuclear@0 18 }
nuclear@0 19
nuclear@0 20 template <typename T, typename T0>
nuclear@0 21 shared_ptr<T> make_shared(const T0& t0) {
nuclear@0 22 return shared_ptr<T>(new T(t0));
nuclear@0 23 }
nuclear@0 24
nuclear@0 25 template <typename T, typename T0,typename T1>
nuclear@0 26 shared_ptr<T> make_shared(const T0& t0, const T1& t1) {
nuclear@0 27 return shared_ptr<T>(new T(t0,t1));
nuclear@0 28 }
nuclear@0 29
nuclear@0 30 template <typename T, typename T0,typename T1,typename T2>
nuclear@0 31 shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2) {
nuclear@0 32 return shared_ptr<T>(new T(t0,t1,t2));
nuclear@0 33 }
nuclear@0 34
nuclear@0 35 template <typename T, typename T0,typename T1,typename T2,typename T3>
nuclear@0 36 shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3) {
nuclear@0 37 return shared_ptr<T>(new T(t0,t1,t2,t3));
nuclear@0 38 }
nuclear@0 39
nuclear@0 40 template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4>
nuclear@0 41 shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) {
nuclear@0 42 return shared_ptr<T>(new T(t0,t1,t2,t3,t4));
nuclear@0 43 }
nuclear@0 44
nuclear@0 45 template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4, typename T5>
nuclear@0 46 shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) {
nuclear@0 47 return shared_ptr<T>(new T(t0,t1,t2,t3,t4,t5));
nuclear@0 48 }
nuclear@0 49
nuclear@0 50 template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4, typename T5, typename T6>
nuclear@0 51 shared_ptr<T> 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 52 return shared_ptr<T>(new T(t0,t1,t2,t3,t4,t5,t6));
nuclear@0 53 }
nuclear@0 54 }
nuclear@0 55
nuclear@0 56
nuclear@0 57 #endif