chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.73k stars 1.2k forks source link

experimental coro is missing an include of <limits> #1351

Open alokpr opened 10 months ago

alokpr commented 10 months ago

Compiler error message with version 1.28.1:

In file included from asio/asio/experimental/coro.hpp:24:
asio/asio/experimental/detail/coro_promise_allocator.hpp: In function 'constexpr std::size_t asio::experimental::detail::variadic_first(std::size_t)':
asio/asio/experimental/detail/coro_promise_allocator.hpp:64:44: error: incomplete type 'std::numeric_limits<long unsigned int>' used in nested name specifier
   64 |   return std::numeric_limits<std::size_t>::max();
      |                                            ^~~

Adding #include <limits> before #include "asio/experimental/coro.hpp" fixes the issue.