mirror of
https://github.com/boostorg/container.git
synced 2025-08-01 21:44:27 +02:00
Disable Wdeprecated-declarations when using deprecated allocator
This commit is contained in:
@@ -533,17 +533,35 @@ struct allocator_traits
|
|||||||
inline static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer)
|
inline static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer)
|
||||||
{ return a.allocate(n); }
|
{ return a.allocate(n); }
|
||||||
|
|
||||||
|
#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
inline static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||||
{ a.destroy(p); }
|
{ a.destroy(p); }
|
||||||
|
|
||||||
|
#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
inline static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW
|
||||||
{ p->~T(); (void)p; }
|
{ p->~T(); (void)p; }
|
||||||
|
|
||||||
|
#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
inline static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
inline static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||||
{ return a.max_size(); }
|
{ return a.max_size(); }
|
||||||
|
|
||||||
|
#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
inline static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
inline static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW
|
||||||
{ return size_type(-1)/sizeof(value_type); }
|
{ return size_type(-1)/sizeof(value_type); }
|
||||||
|
|
||||||
@@ -553,6 +571,12 @@ struct allocator_traits
|
|||||||
inline static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
inline static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
|
||||||
{ return a; }
|
{ return a; }
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
template<class T, class ...Args>
|
template<class T, class ...Args>
|
||||||
inline static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
|
inline static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
|
||||||
@@ -598,6 +622,11 @@ struct allocator_traits
|
|||||||
|
|
||||||
#endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
#endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||||
|
|
||||||
|
#if defined(BOOST_CONTAINER_GCC_COMPATIBLE_HAS_DIAGNOSTIC_IGNORED)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
inline static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&)
|
inline static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&)
|
||||||
{ ::new((void*)p, boost_container_new_t()) T; }
|
{ ::new((void*)p, boost_container_new_t()) T; }
|
||||||
|
Reference in New Issue
Block a user