Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-11 warning: 'allocator<void>' is deprecated #785

Open
k15tfu opened this issue Jan 28, 2021 · 4 comments
Open

clang-11 warning: 'allocator<void>' is deprecated #785

k15tfu opened this issue Jan 28, 2021 · 4 comments

Comments

@k15tfu
Copy link

k15tfu commented Jan 28, 2021

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.

@eakraly
Copy link

eakraly commented Feb 1, 2021

Same warnings with Android NDK22

@nx10
Copy link

nx10 commented Apr 2, 2021

Might be related to #290.

@k15tfu
Copy link
Author

k15tfu commented Jun 13, 2022

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> >
                              ^

@INotfound
Copy link

I also encountered this problem, how to deal with it, I think the C++20 standard has been removed allocator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants