+ add dummy implementation of make_shared to boost workaround (unlike the original, it does *not* offer any performance benefits).
git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1023 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
b9f14beb76
commit
68a10dd1b0
|
@ -0,0 +1,57 @@
|
|||
|
||||
// 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 <typename T>
|
||||
shared_ptr<T> make_shared() {
|
||||
return shared_ptr<T>(new T());
|
||||
}
|
||||
|
||||
template <typename T, typename T0>
|
||||
shared_ptr<T> make_shared(const T0& t0) {
|
||||
return shared_ptr<T>(new T(t0));
|
||||
}
|
||||
|
||||
template <typename T, typename T0,typename T1>
|
||||
shared_ptr<T> make_shared(const T0& t0, const T1& t1) {
|
||||
return shared_ptr<T>(new T(t0,t1));
|
||||
}
|
||||
|
||||
template <typename T, typename T0,typename T1,typename T2>
|
||||
shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2) {
|
||||
return shared_ptr<T>(new T(t0,t1,t2));
|
||||
}
|
||||
|
||||
template <typename T, typename T0,typename T1,typename T2,typename T3>
|
||||
shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3) {
|
||||
return shared_ptr<T>(new T(t0,t1,t2,t3));
|
||||
}
|
||||
|
||||
template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4>
|
||||
shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4) {
|
||||
return shared_ptr<T>(new T(t0,t1,t2,t3,t4));
|
||||
}
|
||||
|
||||
template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4, typename T5>
|
||||
shared_ptr<T> make_shared(const T0& t0, const T1& t1, const T2& t2, const T3& t3, const T4& t4, const T5& t5) {
|
||||
return shared_ptr<T>(new T(t0,t1,t2,t3,t4,t5));
|
||||
}
|
||||
|
||||
template <typename T, typename T0,typename T1,typename T2,typename T3, typename T4, typename T5, typename T6>
|
||||
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) {
|
||||
return shared_ptr<T>(new T(t0,t1,t2,t3,t4,t5,t6));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif
|
|
@ -70,6 +70,7 @@ SET( Boost_SRCS
|
|||
BoostWorkaround/boost/scoped_ptr.hpp
|
||||
BoostWorkaround/boost/shared_array.hpp
|
||||
BoostWorkaround/boost/shared_ptr.hpp
|
||||
BoostWorkaround/boost/make_shared.hpp
|
||||
BoostWorkaround/boost/static_assert.hpp
|
||||
BoostWorkaround/boost/tuple/tuple.hpp
|
||||
)
|
||||
|
|
|
@ -4072,6 +4072,10 @@
|
|||
RelativePath="..\..\code\BoostWorkaround\boost\lexical_cast.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\code\BoostWorkaround\boost\make_shared.hpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\code\BoostWorkaround\boost\pointer_cast.hpp"
|
||||
>
|
||||
|
|
Loading…
Reference in New Issue