diff --git a/CGAL_Core/include/CGAL/CORE/CoreDefs.h b/CGAL_Core/include/CGAL/CORE/CoreDefs.h index 90759e086fa..499d7b1dbf3 100644 --- a/CGAL_Core/include/CGAL/CORE/CoreDefs.h +++ b/CGAL_Core/include/CGAL/CORE/CoreDefs.h @@ -41,6 +41,7 @@ #include #include +#include #ifdef CGAL_HEADER_ONLY @@ -340,4 +341,6 @@ inline void setPositionalFormat(std::ostream& o = std::cout) { #include #endif // CGAL_HEADER_ONLY +#include + #endif // _CORE_COREDEFS_H_ diff --git a/Installation/include/CGAL/disable_warnings.h b/Installation/include/CGAL/disable_warnings.h index 6c180ab3514..587492aad9c 100644 --- a/Installation/include/CGAL/disable_warnings.h +++ b/Installation/include/CGAL/disable_warnings.h @@ -34,6 +34,7 @@ # pragma warning(disable: 4714) // function marked as __forceinline not inlined # pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) # pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used +# pragma warning(disable: 4834) // discarding return value of function with 'nodiscard' attribute #endif diff --git a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h index f9228e36d0b..a149a137f06 100644 --- a/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h +++ b/Partition_2/include/CGAL/Partition_2/Rotation_tree_2.h @@ -36,6 +36,8 @@ #ifndef CGAL_ROTATION_TREE_H #define CGAL_ROTATION_TREE_H +#include + #include @@ -178,6 +180,8 @@ private: #include +#include + #endif // CGAL_ROTATION_TREE_H // For the Emacs editor: diff --git a/SearchStructures/include/CGAL/Segment_tree_d.h b/SearchStructures/include/CGAL/Segment_tree_d.h index 1c0b6dafe39..625050bd1c5 100644 --- a/SearchStructures/include/CGAL/Segment_tree_d.h +++ b/SearchStructures/include/CGAL/Segment_tree_d.h @@ -107,7 +107,8 @@ protected: typedef Segment_tree_node Segment_tree_node_t; typedef Segment_tree_node *link_type; - std::allocator alloc; + typedef std::allocator allocator_type; + allocator_type alloc; C_Interface m_interface; bool is_built; @@ -197,7 +198,11 @@ protected: { Segment_tree_node_t node(l,r,kl,kr); Segment_tree_node_t* node_ptr = alloc.allocate(1); +#ifdef CGAL_CXX11 + std::allocator_traits::construct(alloc, node_ptr, node); +#else alloc.construct(node_ptr, node); +#endif return node_ptr; } @@ -205,7 +210,11 @@ protected: { Segment_tree_node_t node(kl,kr); Segment_tree_node_t* node_ptr = alloc.allocate(1); +#ifdef CGAL_CXX11 + std::allocator_traits::construct(alloc, node_ptr, node); +#else alloc.construct(node_ptr, node); +#endif return node_ptr; } @@ -213,7 +222,11 @@ protected: { Segment_tree_node_t node; Segment_tree_node_t* node_ptr = alloc.allocate(1); +#ifdef CGAL_CXX11 + std::allocator_traits::construct(alloc, node_ptr, node); +#else alloc.construct(node_ptr, node); +#endif return node_ptr; } @@ -298,7 +311,11 @@ protected: void delete_node(Segment_tree_node_t* node_ptr) { +#ifdef CGAL_CXX11 + std::allocator_traits::destroy(alloc, node_ptr); +#else alloc.destroy(node_ptr); +#endif alloc.deallocate(node_ptr,1); }