Most members of std::allocate are deprecated in C++17:

fix #1202

Replace them by their cousins from std::allocator_traits;
otherwise, heaps of deprecation warnings will fall onto
humble users when compiling with MSVC 15 in C++17 mode.

Signed-off-by: Daniela Engert <dani@ngrt.de>
This commit is contained in:
Daniela Engert
2018-07-21 18:46:16 +02:00
committed by Vinnie Falco
parent 8ed039200d
commit e0f4c1d769
3 changed files with 11 additions and 0 deletions

View File

@ -1,6 +1,7 @@
Version 179:
* Use the exchange() idiom in move constructors
* Most members of std::allocate are deprecated in C++17
--------------------------------------------------------------------------------

View File

@ -28,8 +28,13 @@ class flat_stream<NextLayer>::write_op
: public boost::asio::coroutine
{
using alloc_type = typename
#if defined(BOOST_NO_CXX11_ALLOCATOR)
boost::asio::associated_allocator_t<Handler>::template
rebind<char>::other;
#else
std::allocator_traits<boost::asio::associated_allocator_t<Handler>>
::template rebind_alloc<char>;
#endif
struct deleter
{

View File

@ -197,8 +197,13 @@ class icy_stream<NextLayer>::read_op
: public boost::asio::coroutine
{
using alloc_type = typename
#if defined(BOOST_NO_CXX11_ALLOCATOR)
boost::asio::associated_allocator_t<Handler>::template
rebind<char>::other;
#else
std::allocator_traits<boost::asio::associated_allocator_t<Handler>>
::template rebind_alloc<char>;
#endif
struct data
{