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

2.0 fails to build: no member named 'value' in 'std::__1::is_empty<asio::io_context>' #488

Closed
yurivict opened this issue Apr 7, 2020 · 5 comments

Comments

@yurivict
Copy link

yurivict commented Apr 7, 2020

/usr/include/c++/v1/memory:2132:30: error: no member named 'value' in 'std::__1::is_empty<asio::io_context>'
              is_empty<_Tp>::value && !__libcpp_is_final<_Tp>::value>
              ~~~~~~~~~~~~~~~^
/usr/include/c++/v1/memory:2213:32: note: in instantiation of default argument for '__compressed_pair_elem<asio::io_context, 1>' required here
  typedef _LIBCPP_NODEBUG_TYPE __compressed_pair_elem<_T2, 1> _Base2;
                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/memory:3532:36: note: in instantiation of template class 'std::__1::__compressed_pair<std::__1::allocator<asio::io_context>, asio::io_context>' requested here
    __compressed_pair<_Alloc, _Tp> __data_;
                                   ^
/usr/include/c++/v1/memory:4202:26: note: in instantiation of template class 'std::__1::__shared_ptr_emplace<asio::io_context, std::__1::allocator<asio::io_context> >' requested here
    ::new(__hold2.get()) _CntrlBlk(__a2, _VSTD::forward<_Args>(__args)...);
                         ^
/usr/include/c++/v1/memory:4581:29: note: in instantiation of function template specialization 'std::__1::shared_ptr<asio::io_context>::make_shared<>' requested here
    return shared_ptr<_Tp>::make_shared(_VSTD::forward<_Args>(__args)...);
                            ^
/usr/ports/devel/opendht/work/opendht-2.0.0/src/peer_discovery.cpp:307:26: note: in instantiation of function template specialization 'std::__1::make_shared<asio::io_context>' requested here
        ioContext = std::make_shared<asio::io_context>();
                         ^
@aberaud
Copy link
Member

aberaud commented Apr 7, 2020

What version of asio are you using ? It should work at least with asio 1.12

You can also build without the peer discovery module and http proxy support to avoid depending on asio (with cmake: -DOPENDHT_PEER_DISCOVERY=Off)

@yurivict
Copy link
Author

yurivict commented Apr 7, 2020

asio-1.10.6

@yurivict
Copy link
Author

yurivict commented Apr 7, 2020

clang-9
FreeBSD 12.1

@AmarOk1412
Copy link
Contributor

asio-1.10.6

Update your version, you need asio 1.12 as adrien said.

@yurivict
Copy link
Author

yurivict commented Apr 7, 2020

asio-1.16.0 works.

Thanks!

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

3 participants