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

Fails to build with Boost 1.70.0 #3990

Closed
jbeich opened this issue Mar 17, 2019 · 1 comment
Closed

Fails to build with Boost 1.70.0 #3990

jbeich opened this issue Mar 17, 2019 · 1 comment
Labels
Blocker: New Stable Issues that must be resolved prior to the next stable series being released. Building Build-time issues. Network Issues in the networking API.
Milestone

Comments

@jbeich
Copy link

jbeich commented Mar 17, 2019

Regressed by boostorg/asio@59066d80b26e. Probably similar to zaphoyd/websocketpp#794. Dropping std::ref() appears to help.

socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));

In file included from src/server/server_base.cpp:15:
In file included from src/server/server_base.hpp:26:
In file included from /usr/local/include/boost/asio.hpp:24:
In file included from /usr/local/include/boost/asio/basic_datagram_socket.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:179:22: error: no member named 'context' in
      'std::__1::reference_wrapper<boost::asio::io_context>'
    return executor_.context();
           ~~~~~~~~~ ^
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::context' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/usr/include/c++/v1/memory:2156:18: note: in instantiation of function template specialization
      'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/usr/include/c++/v1/__config:816:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/usr/include/c++/v1/memory:2259:9: note: in instantiation of function template specialization
      'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, 1,
      false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/usr/include/c++/v1/memory:3672:16: note: in instantiation of function template specialization
      'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4331:26: note: in instantiation of function template specialization
      'std::__1::__shared_ptr_emplace<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > >::__shared_ptr_emplace<std::__1::reference_wrapper<boost::asio::io_context> >'
      requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4710:29: note: in instantiation of function template specialization
      'std::__1::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::make_shared<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
src/server/server_base.cpp:80:27: note: in instantiation of function template specialization
      'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>,
      std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));
                                 ^
In file included from src/server/server_base.cpp:15:
In file included from src/server/server_base.hpp:26:
In file included from /usr/local/include/boost/asio.hpp:24:
In file included from /usr/local/include/boost/asio/basic_datagram_socket.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:169:15: error: no member named 'on_work_started' in
      'std::__1::reference_wrapper<boost::asio::io_context>'
    executor_.on_work_started();
    ~~~~~~~~~ ^
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::on_work_started' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/usr/include/c++/v1/memory:2156:18: note: in instantiation of function template specialization
      'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/usr/include/c++/v1/__config:816:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/usr/include/c++/v1/memory:2259:9: note: in instantiation of function template specialization
      'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, 1,
      false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/usr/include/c++/v1/memory:3672:16: note: in instantiation of function template specialization
      'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4331:26: note: in instantiation of function template specialization
      'std::__1::__shared_ptr_emplace<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > >::__shared_ptr_emplace<std::__1::reference_wrapper<boost::asio::io_context> >'
      requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4710:29: note: in instantiation of function template specialization
      'std::__1::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::make_shared<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
src/server/server_base.cpp:80:27: note: in instantiation of function template specialization
      'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>,
      std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));
                                 ^
In file included from src/server/server_base.cpp:15:
In file included from src/server/server_base.hpp:26:
In file included from /usr/local/include/boost/asio.hpp:24:
In file included from /usr/local/include/boost/asio/basic_datagram_socket.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:174:15: error: no member named 'on_work_finished' in
      'std::__1::reference_wrapper<boost::asio::io_context>'
    executor_.on_work_finished();
    ~~~~~~~~~ ^
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::on_work_finished' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/usr/include/c++/v1/memory:2156:18: note: in instantiation of function template specialization
      'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/usr/include/c++/v1/__config:816:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/usr/include/c++/v1/memory:2259:9: note: in instantiation of function template specialization
      'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, 1,
      false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/usr/include/c++/v1/memory:3672:16: note: in instantiation of function template specialization
      'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4331:26: note: in instantiation of function template specialization
      'std::__1::__shared_ptr_emplace<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > >::__shared_ptr_emplace<std::__1::reference_wrapper<boost::asio::io_context> >'
      requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4710:29: note: in instantiation of function template specialization
      'std::__1::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::make_shared<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
src/server/server_base.cpp:80:27: note: in instantiation of function template specialization
      'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>,
      std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));
                                 ^
In file included from src/server/server_base.cpp:15:
In file included from src/server/server_base.hpp:26:
In file included from /usr/local/include/boost/asio.hpp:24:
In file included from /usr/local/include/boost/asio/basic_datagram_socket.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:184:15: error: no member named 'dispatch' in
      'std::__1::reference_wrapper<boost::asio::io_context>'
    executor_.dispatch(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
    ~~~~~~~~~ ^
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::dispatch' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/usr/include/c++/v1/memory:2156:18: note: in instantiation of function template specialization
      'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/usr/include/c++/v1/__config:816:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/usr/include/c++/v1/memory:2259:9: note: in instantiation of function template specialization
      'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, 1,
      false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/usr/include/c++/v1/memory:3672:16: note: in instantiation of function template specialization
      'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4331:26: note: in instantiation of function template specialization
      'std::__1::__shared_ptr_emplace<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > >::__shared_ptr_emplace<std::__1::reference_wrapper<boost::asio::io_context> >'
      requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4710:29: note: in instantiation of function template specialization
      'std::__1::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::make_shared<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
src/server/server_base.cpp:80:27: note: in instantiation of function template specialization
      'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>,
      std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));
                                 ^
In file included from src/server/server_base.cpp:15:
In file included from src/server/server_base.hpp:26:
In file included from /usr/local/include/boost/asio.hpp:24:
In file included from /usr/local/include/boost/asio/basic_datagram_socket.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:189:15: error: no member named 'post' in
      'std::__1::reference_wrapper<boost::asio::io_context>'
    executor_.post(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
    ~~~~~~~~~ ^
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::post' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/usr/include/c++/v1/memory:2156:18: note: in instantiation of function template specialization
      'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/usr/include/c++/v1/__config:816:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/usr/include/c++/v1/memory:2259:9: note: in instantiation of function template specialization
      'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, 1,
      false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/usr/include/c++/v1/memory:3672:16: note: in instantiation of function template specialization
      'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4331:26: note: in instantiation of function template specialization
      'std::__1::__shared_ptr_emplace<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > >::__shared_ptr_emplace<std::__1::reference_wrapper<boost::asio::io_context> >'
      requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4710:29: note: in instantiation of function template specialization
      'std::__1::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::make_shared<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
src/server/server_base.cpp:80:27: note: in instantiation of function template specialization
      'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>,
      std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));
                                 ^
In file included from src/server/server_base.cpp:15:
In file included from src/server/server_base.hpp:26:
In file included from /usr/local/include/boost/asio.hpp:24:
In file included from /usr/local/include/boost/asio/basic_datagram_socket.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:194:15: error: no member named 'defer' in
      'std::__1::reference_wrapper<boost::asio::io_context>'
    executor_.defer(BOOST_ASIO_MOVE_CAST(function)(f), allocator_);
    ~~~~~~~~~ ^
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::defer' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/usr/include/c++/v1/memory:2156:18: note: in instantiation of function template specialization
      'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/usr/include/c++/v1/__config:816:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/usr/include/c++/v1/memory:2259:9: note: in instantiation of function template specialization
      'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, 1,
      false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/usr/include/c++/v1/memory:3672:16: note: in instantiation of function template specialization
      'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4331:26: note: in instantiation of function template specialization
      'std::__1::__shared_ptr_emplace<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > >::__shared_ptr_emplace<std::__1::reference_wrapper<boost::asio::io_context> >'
      requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4710:29: note: in instantiation of function template specialization
      'std::__1::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::make_shared<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
src/server/server_base.cpp:80:27: note: in instantiation of function template specialization
      'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>,
      std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));
                                 ^
In file included from src/server/server_base.cpp:15:
In file included from src/server/server_base.hpp:26:
In file included from /usr/local/include/boost/asio.hpp:24:
In file included from /usr/local/include/boost/asio/basic_datagram_socket.hpp:20:
In file included from /usr/local/include/boost/asio/basic_socket.hpp:27:
In file included from /usr/local/include/boost/asio/executor.hpp:338:
/usr/local/include/boost/asio/impl/executor.hpp:218:22: error: invalid operands to binary expression ('const
      std::__1::reference_wrapper<boost::asio::io_context>' and 'const
      std::__1::reference_wrapper<boost::asio::io_context>')
    return executor_ == *static_cast<const Executor*>(e->target());
           ~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/local/include/boost/asio/impl/executor.hpp:142:3: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::equals' requested here
  impl(const Executor& e, const Allocator& a) BOOST_ASIO_NOEXCEPT
  ^
/usr/local/include/boost/asio/impl/executor.hpp:137:30: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::impl' requested here
    impl* p = new (mem.ptr_) impl(e, a);
                             ^
/usr/local/include/boost/asio/impl/executor.hpp:333:50: note: in instantiation of member function
      'boost::asio::executor::impl<std::__1::reference_wrapper<boost::asio::io_context>, std::__1::allocator<void>
      >::create' requested here
  : impl_(impl<Executor, std::allocator<void> >::create(e))
                                                 ^
/usr/include/c++/v1/memory:2156:18: note: in instantiation of function template specialization
      'boost::asio::executor::executor<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
      : __value_(_VSTD::forward<_Args>(_VSTD::get<_Indexes>(__args))...) {}
                 ^
/usr/include/c++/v1/__config:816:15: note: expanded from macro '_VSTD'
#define _VSTD std::_LIBCPP_ABI_NAMESPACE
              ^
/usr/include/c++/v1/memory:2259:9: note: in instantiation of function template specialization
      'std::__1::__compressed_pair_elem<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, 1,
      false>::__compressed_pair_elem<std::__1::reference_wrapper<boost::asio::io_context> &&, 0>' requested here
        _Base2(__pc, _VSTD::move(__second_args),
        ^
/usr/include/c++/v1/memory:3672:16: note: in instantiation of function template specialization
      'std::__1::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> >, boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::__compressed_pair<std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > &, std::__1::reference_wrapper<boost::asio::io_context> &&>' requested here
            :  __data_(piecewise_construct, _VSTD::forward_as_tuple(__a),
               ^
/usr/include/c++/v1/memory:4331:26: note: in instantiation of function template specialization
      'std::__1::__shared_ptr_emplace<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor>, std::__1::allocator<boost::asio::basic_stream_socket<boost::asio::ip::tcp,
      boost::asio::executor> > >::__shared_ptr_emplace<std::__1::reference_wrapper<boost::asio::io_context> >'
      requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4710:29: note: in instantiation of function template specialization
      'std::__1::shared_ptr<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>
      >::make_shared<std::__1::reference_wrapper<boost::asio::io_context> >' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
src/server/server_base.cpp:80:27: note: in instantiation of function template specialization
      'std::__1::make_shared<boost::asio::basic_stream_socket<boost::asio::ip::tcp, boost::asio::executor>,
      std::__1::reference_wrapper<boost::asio::io_context> >' requested here
        socket_ptr socket = std::make_shared<boost::asio::ip::tcp::socket>(std::ref(io_service_));
                                 ^
/usr/include/c++/v1/system_error:391:1: note: candidate function not viable: no known conversion from 'const
      std::__1::reference_wrapper<boost::asio::io_context>' to 'const std::__1::error_code' for 1st argument
operator==(const error_code& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:398:1: note: candidate function not viable: no known conversion from 'const
      std::__1::reference_wrapper<boost::asio::io_context>' to 'const std::__1::error_code' for 1st argument
operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:406:1: note: candidate function not viable: no known conversion from 'const
      std::__1::reference_wrapper<boost::asio::io_context>' to 'const std::__1::error_condition' for 1st argument
operator==(const error_condition& __x, const error_code& __y) _NOEXCEPT
^
/usr/include/c++/v1/system_error:413:1: note: candidate function not viable: no known conversion from 'const
      std::__1::reference_wrapper<boost::asio::io_context>' to 'const std::__1::error_condition' for 1st argument
operator==(const error_condition& __x, const error_condition& __y) _NOEXCEPT
^
/usr/include/c++/v1/utility:580:1: note: candidate template ignored: could not match 'pair' against
      'reference_wrapper'
operator==(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
^
/usr/include/c++/v1/iterator:712:1: note: candidate template ignored: could not match 'reverse_iterator' against
      'reference_wrapper'
operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
^
/usr/include/c++/v1/iterator:941:1: note: candidate template ignored: could not match 'istream_iterator' against
      'reference_wrapper'
operator==(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
^
/usr/include/c++/v1/iterator:1045:6: note: candidate template ignored: could not match 'istreambuf_iterator'
      against 'reference_wrapper'
bool operator==(const istreambuf_iterator<_CharT,_Traits>& __a,
     ^
/usr/include/c++/v1/iterator:1153:1: note: candidate template ignored: could not match 'move_iterator' against
      'reference_wrapper'
operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
^
/usr/include/c++/v1/iterator:1525:1: note: candidate template ignored: could not match '__wrap_iter' against
      'reference_wrapper'
operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT_DEBUG
^
/usr/include/c++/v1/tuple:1122:1: note: candidate template ignored: could not match 'tuple' against
      'reference_wrapper'
operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
^
/usr/include/c++/v1/memory:1987:6: note: candidate template ignored: could not match 'allocator' against
      'reference_wrapper'
bool operator==(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return true;}
     ^
/usr/include/c++/v1/memory:2964:1: note: candidate template ignored: could not match 'unique_ptr' against
      'reference_wrapper'
operator==(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return __x.get() == __y.get();}
^
/usr/include/c++/v1/memory:3000:1: note: candidate template ignored: could not match 'unique_ptr' against
      'reference_wrapper'
operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
^
/usr/include/c++/v1/memory:3008:1: note: candidate template ignored: could not match 'unique_ptr' against
      'reference_wrapper'
operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
^
/usr/include/c++/v1/memory:4796:1: note: candidate template ignored: could not match 'shared_ptr' against
      'reference_wrapper'
operator==(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
^
/usr/include/c++/v1/memory:4850:1: note: candidate template ignored: could not match 'shared_ptr' against
      'reference_wrapper'
operator==(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
^
/usr/include/c++/v1/memory:4858:1: note: candidate template ignored: could not match 'shared_ptr' against
      'reference_wrapper'
operator==(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
^
/usr/include/c++/v1/functional:2380:1: note: candidate template ignored: could not match 'function' against
      'reference_wrapper'
operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return !__f;}
^
/usr/include/c++/v1/functional:2385:1: note: candidate template ignored: could not match 'function' against
      'reference_wrapper'
operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return !__f;}
^
/usr/include/c++/v1/string_view:614:6: note: candidate template ignored: could not match 'basic_string_view'
      against 'reference_wrapper'
bool operator==(basic_string_view<_CharT, _Traits> __lhs,
     ^
/usr/include/c++/v1/string_view:623:6: note: candidate template ignored: could not match 'basic_string_view'
      against 'reference_wrapper'
bool operator==(basic_string_view<_CharT, _Traits> __lhs,
     ^
/usr/include/c++/v1/string_view:632:6: note: candidate template ignored: could not match 'basic_string_view'
      against 'reference_wrapper'
bool operator==(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
     ^
/usr/include/c++/v1/string:564:6: note: candidate template ignored: could not match 'fpos' against
      'reference_wrapper'
bool operator==(const fpos<_StateT>& __x, const fpos<_StateT>& __y)
     ^
/usr/include/c++/v1/string:3845:1: note: candidate template ignored: could not match 'basic_string' against
      'reference_wrapper'
operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
^
/usr/include/c++/v1/string:3857:1: note: candidate template ignored: could not match 'basic_string' against
      'reference_wrapper'
operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
^
/usr/include/c++/v1/string:3876:1: note: candidate template ignored: could not match 'const _CharT *' against
      'std::__1::reference_wrapper<boost::asio::io_context>'
operator==(const _CharT* __lhs,
^
/usr/include/c++/v1/string:3889:1: note: candidate template ignored: could not match 'basic_string' against
      'reference_wrapper'
operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
^
/usr/include/c++/v1/map:1563:1: note: candidate template ignored: could not match 'map' against
      'reference_wrapper'
operator==(const map<_Key, _Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/map:2108:1: note: candidate template ignored: could not match 'multimap' against
      'reference_wrapper'
operator==(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/vector:3361:1: note: candidate template ignored: could not match 'vector' against
      'reference_wrapper'
operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
^
/usr/include/c++/v1/array:372:1: note: candidate template ignored: could not match 'array' against
      'reference_wrapper'
operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
^
/usr/include/c++/v1/set:859:1: note: candidate template ignored: could not match 'set' against 'reference_wrapper'
operator==(const set<_Key, _Compare, _Allocator>& __x,
^
/usr/include/c++/v1/set:1347:1: note: candidate template ignored: could not match 'multiset' against
      'reference_wrapper'
operator==(const multiset<_Key, _Compare, _Allocator>& __x,
^
7 errors generated.
@jyrkive jyrkive added Network Issues in the networking API. Building Build-time issues. labels Mar 17, 2019
@jyrkive
Copy link
Member

jyrkive commented Mar 17, 2019

Git blame tells that this std::ref has been there (originally as boost::ref) ever since @loonycyborg's initial server implementation based on Boost.Asio: e9ded20

@sevu sevu added this to the 1.14.7 milestone Mar 21, 2019
@sevu sevu added the Blocker: New Stable Issues that must be resolved prior to the next stable series being released. label Mar 21, 2019
@jbeich jbeich changed the title Fails to build with Boost 1.70 (Beta1) Fails to build with Boost 1.70.0 Apr 13, 2019
@nemaara nemaara modified the milestones: 1.14.7, 1.14.8 Apr 16, 2019
Vultraz added a commit that referenced this issue Jul 14, 2019
)

The asio socket ctor already takes a reference.
Vultraz added a commit that referenced this issue Sep 29, 2019
)

The asio socket ctor already takes a reference.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker: New Stable Issues that must be resolved prior to the next stable series being released. Building Build-time issues. Network Issues in the networking API.
Projects
None yet
Development

No branches or pull requests

4 participants