Open ghost opened 3 years ago
@ssfang commented on Aug 31, 2019, 2:52 PM UTC:
Hi,
I‘m trying boost aiso examples on my andoird mobile phone.
Unfortunately!
When I compiled the time_t_timer example, using c4doird app by g++ -std=c++17 on android, the g++ complained:
g++ -std=c++17
no member allocate and deallocate
allocate
deallocate
at the line 190 in handler_alloc_helpers.hpp, and I found it occurred when compiling the parameter of async_wait:
async_wait
timer.async_wait( [](const boost::system::error_code& /*error*/) { std::cout << "timeout\n"; });
After I
updated the line 59 in memory.hpp to:
typename std::allocator_traits<alloc>::template rebind_alloc<t>::other
or,
#define BOOST_ASIO_DISABLE_CXX11_ALLOCATORS
#include <boost/asio.hpp>
The problem disappeared!
Is there a problem here?
https://github.com/boostorg/asio/blob/master/include/boost/asio/detail/memory.hpp
This issue was moved by chriskohlhoff from boostorg/asio#275.
@djarek commented on Sep 4, 2019, 4:33 PM UTC:
At first glance, it seems that there is a bug and your first solution should be applied.
@ssfang commented on Aug 31, 2019, 2:52 PM UTC:
Hi,
I‘m trying boost aiso examples on my andoird mobile phone.
Unfortunately!
When I compiled the time_t_timer example, using c4doird app by
g++ -std=c++17
on android, the g++ complained:no member
allocate
anddeallocate
at the line 190 in handler_alloc_helpers.hpp, and I found it occurred when compiling the parameter of
async_wait
:After I
updated the line 59 in memory.hpp to:
or,
#define BOOST_ASIO_DISABLE_CXX11_ALLOCATORS
before#include <boost/asio.hpp>
,The problem disappeared!
Is there a problem here?
https://github.com/boostorg/asio/blob/master/include/boost/asio/detail/memory.hpp
This issue was moved by chriskohlhoff from boostorg/asio#275.