libc++ differences between 9.2 and 10.0

Shane Ambler FreeBSD at ShaneWare.Biz
Fri Sep 20 05:32:05 UTC 2013


I'm Starting to look at fixing my ports to build on 10.0 and there
appears to be a difference between 9.2 and 10.0 when it comes to using 
libc++

The first port I am looking at is graphics/opencolorio. a patch was
submitted (ports/182220) that works fine on 10.0 but it breaks 9.2 build
when using clang with -
error: no type named 'shared_ptr' in namespace 'std'

The patch is simple, just adding -

#elif __cplusplus >= 199711
#include <memory>
#define OCIO_SHARED_PTR std::shared_ptr
#define OCIO_DYNAMIC_POINTER_CAST std::dynamic_pointer_cast

As far as I can see both 10.0 and 9.2 use the same contrib/libc++
contents but I don't see why 9.2 isn't finding std::shared_ptr


The other thing is I don't think testing __cplusplus is the right way to
go but don't see an alternative. __cplusplus is defined in clang
irrespective of the library used so isn't really a reliable test.

Are there any defines to easily test for std::shared_ptr or is that a
test I need to create for configure or cmake - has already been done?




More information about the freebsd-ports mailing list