diff options
Diffstat (limited to 'extern/carve/include')
-rw-r--r-- | extern/carve/include/carve/config.h | 18 | ||||
-rw-r--r-- | extern/carve/include/carve/mesh_ops.hpp | 2 |
2 files changed, 19 insertions, 1 deletions
diff --git a/extern/carve/include/carve/config.h b/extern/carve/include/carve/config.h index fdae2d2843f..3533c1a6710 100644 --- a/extern/carve/include/carve/config.h +++ b/extern/carve/include/carve/config.h @@ -10,3 +10,21 @@ # define HAVE_STDINT_H #endif + +// Support for latest Clang/LLVM on FreeBSD which does have different libcxx. +// +// TODO(sergey): Move it some some more generic header with platform-specific +// declarations. + +// Indicates whether __is_heap is available +#undef HAVE_IS_HEAP + +#ifdef __GNUC__ +// NeyBSD doesn't have __is_heap +# ifndef __NetBSD__ +# define HAVE_IS_HEAP +# ifdef _LIBCPP_VERSION +# define __is_heap is_heap +# endif // _LIBCPP_VERSION +# endif // !__NetBSD__ +#endif // __GNUC__ diff --git a/extern/carve/include/carve/mesh_ops.hpp b/extern/carve/include/carve/mesh_ops.hpp index 02b1bde4e45..3b71feb0e6c 100644 --- a/extern/carve/include/carve/mesh_ops.hpp +++ b/extern/carve/include/carve/mesh_ops.hpp @@ -580,7 +580,7 @@ namespace carve { std::vector<VertexInfo *> queue; void checkheap() { -#ifdef __GNUC__ +#if defined(HAVE_IS_HEAP) CARVE_ASSERT(std::__is_heap(queue.begin(), queue.end(), order_by_score())); #endif } |