Skip to content

Commit d12528d

Browse files
committed
Disable "-Wdeprecated-declarations" for max_size which was deprecated in the standard.
1 parent bae5554 commit d12528d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

include/boost/container/allocator_traits.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,19 @@ class small_vector_allocator;
192192

193193
namespace allocator_traits_detail {
194194

195+
#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
196+
#pragma GCC diagnostic push
197+
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
198+
#endif
199+
195200
BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_max_size, max_size)
196201
BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_construction, select_on_container_copy_construction)
197202

203+
204+
#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
205+
#pragma GCC diagnostic pop
206+
#endif
207+
198208
} //namespace allocator_traits_detail {
199209

200210
namespace dtl {

0 commit comments

Comments
 (0)