asio
asio copied to clipboard
clang-11 warning: 'allocator<void>' is deprecated
In file boost/asio/associated_allocator.hpp:
boost/asio/associated_allocator.hpp:72:49: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
template <typename T, typename Allocator = std::allocator<void> >
^
In file boost/asio/impl/compose.hpp:
boost/asio/impl/compose.hpp:332:12: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
std::allocator<void> >::type allocator_type;
^
In file boost/asio/impl/executor.hpp:
boost/asio/impl/executor.hpp:210:14: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
std::allocator<void>());
^
boost/asio/impl/executor.hpp:216:14: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
std::allocator<void>());
^
boost/asio/impl/executor.hpp:245:31: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
: impl_(impl<Executor, std::allocator<void> >::create(e))
^
In file boost/asio/execution/any_executor.hpp:
boost/asio/execution/any_executor.hpp:607:53: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
function(BOOST_ASIO_MOVE_CAST(F)(f), std::allocator<void>()));
^
In file boost/asio/system_executor.hpp:
boost/asio/system_executor.hpp:166:54: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
basic_system_executor<Blocking, Relationship, std::allocator<void> >
^
In file boost/asio/io_context.hpp:
boost/asio/io_context.hpp:229:36: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
typedef basic_executor_type<std::allocator<void>, 0> executor_type;
^
In file boost/asio/system_context.hpp:
boost/asio/system_context.hpp:40:12: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
std::allocator<void>
^
In file boost/asio/detail/impl/strand_executor_service.hpp:
boost/asio/detail/impl/strand_executor_service.hpp:254:12: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
std::allocator<void>());
^
In file boost/asio/thread_pool.hpp:
boost/asio/thread_pool.hpp:86:36: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
typedef basic_executor_type<std::allocator<void>, 0> executor_type;
^
boost/asio/thread_pool.hpp:89:36: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
typedef basic_executor_type<std::allocator<void>, 0> scheduler_type;
^
boost/asio/thread_pool.hpp:387:49: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
BOOST_ASIO_CONSTEXPR basic_executor_type<std::allocator<void>, Bits>
^
boost/asio/thread_pool.hpp:390:37: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
return basic_executor_type<std::allocator<void>, Bits>(
^
boost/asio/thread_pool.hpp:391:21: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
pool_, std::allocator<void>(), bits_);
^
There are other places that should be fixed.
Same warnings with Android NDK22
Might be related to https://github.com/chriskohlhoff/asio/issues/290.
In file boost/asio/buffer_registration.hpp:
boost/asio/buffer_registration.hpp:62:31: error: 'allocator<void>' is deprecated [-Werror,-Wdeprecated-declarations]
typename Allocator = std::allocator<void> >
^
I also encountered this problem, how to deal with it, I think the C++20 standard has been removed allocator