Date
1 - 6 of 6
Idea: Remove boost:shared_ptr
Jeremy Selan <jeremy...@...>
Would anyone be against us copying the shared_ptr implementation
internally into OCIO? That would let us make the OCIO boost dependency optional, which would let it compile on a plain-vanilla OSX install. The only other part of the code that relies on boost is the testing framework, which is already if def'd. So if the user has boost, you'll get the testing. If the user doesnt have boost, it will skip testing. Thoughts? -- Jeremy
|
|
Larry Gritz <l...@...>
shared_ptr is part of C++0x (in TR1, I think).
So another approach is to rig it so that sufficiently new compilers don't need the boost dependency, and only the old compilers will need to pull it in to get the shared_ptr. Just a thought. On Nov 2, 2010, at 3:29 PM, Jeremy Selan wrote: Would anyone be against us copying the shared_ptr implementation-- Larry Gritz l...@...
|
|
Malcolm Humphreys <malcolmh...@...>
+1 it should be pretty easy to add boost back as a dependency if we need to. I have seen a lot of projects copy the shared_ptr so it seems fairly common practice. .malcolm
On 03 Nov, 2010,at 09:29 AM, Jeremy Selan <jere...@...> wrote:
|
|
Malcolm Humphreys <malcolmh...@...>
+1 it should be pretty easy to add boost back as a dependency if we need
to. I have seen a lot of projects copy the shared_ptr so it seems fairly common practice. .malcolm
On 03 Nov, 2010,at 09:29 AM, Jeremy Selan <jere...@...> wrote:
|
|
Colin Doncaster <colin.d...@...>
Would
toggle quoted messageShow quoted text
#include <tr1/memory> be an option for now?
On 03-11-2010, at 6:00 AM, Malcolm Humphreys wrote:
+1 it should be pretty easy to add boost back as a dependency if we need to. I have seen a lot of projects copy the shared_ptr so it seems fairly common practice.
|
|
Jeremy Selan <jeremy...@...>
Definitely,
I went to add tr1 on mac, and realized we're already doing it. From export/OpenColorIO/OpenColorTypes.h, #ifdef __APPLE__ #include <tr1/memory> #define OCIO_SHARED_PTR std::tr1::shared_ptr #define OCIO_DYNAMIC_POINTER_CAST std::tr1::dynamic_pointer_cast #else #include <boost/shared_ptr.hpp> #define OCIO_SHARED_PTR boost::shared_ptr #define OCIO_DYNAMIC_POINTER_CAST boost::dynamic_pointer_cast #endif So I'll have to see why this didnt work on OSX without boost. Looks like it all should have worked... -- Jeremy
|
|