From d12528d972f49fe72d6a0c82a693f5b72d95869c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Mon, 23 Dec 2024 21:53:47 +0100 Subject: [PATCH] Disable "-Wdeprecated-declarations" for max_size which was deprecated in the standard. --- include/boost/container/allocator_traits.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/boost/container/allocator_traits.hpp b/include/boost/container/allocator_traits.hpp index 0d65d71f..e3df7f9d 100644 --- a/include/boost/container/allocator_traits.hpp +++ b/include/boost/container/allocator_traits.hpp @@ -192,9 +192,19 @@ class small_vector_allocator; namespace allocator_traits_detail { +#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_max_size, max_size) BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_construction, select_on_container_copy_construction) + +#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED) +#pragma GCC diagnostic pop +#endif + } //namespace allocator_traits_detail { namespace dtl {