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

Compilation failure under clang-11 -stdlib=libc++ -std=c++20 #46

Closed
madmongo1 opened this issue Oct 31, 2020 · 1 comment
Closed

Compilation failure under clang-11 -stdlib=libc++ -std=c++20 #46

madmongo1 opened this issue Oct 31, 2020 · 1 comment

Comments

@madmongo1
Copy link

Test program:

#include <boost/signals2.hpp>
int main()
{
}

clang-11 -stdlib=libc++ -std=c++20 test.cpp

I apprears that the code relies on the presence of std::allocator::difference_type etc [which were removed in c++20 ?]

Error output:

In file included from <source>:1:

In file included from /celibs/boost_1_74_0/boost/signals2.hpp:19:

In file included from /celibs/boost_1_74_0/boost/signals2/signal.hpp:22:

In file included from /celibs/boost_1_74_0/boost/signals2/connection.hpp:21:

/celibs/boost_1_74_0/boost/signals2/detail/auto_buffer.hpp:143:37: error: no type named 'size_type' in 'std::__1::allocator<boost::shared_ptr<void>>'

        typedef typename Allocator::size_type            size_type;

                ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~

/celibs/boost_1_74_0/boost/signals2/connection.hpp:53:61: note: in instantiation of template class 'boost::signals2::detail::auto_buffer<boost::shared_ptr<void>, boost::signals2::detail::store_n_objects<10>, boost::signals2::detail::default_grow_policy, std::__1::allocator<boost::shared_ptr<void>>>' requested here

        auto_buffer<shared_ptr<void>, store_n_objects<10> > garbage;

                                                            ^

In file included from <source>:1:

In file included from /celibs/boost_1_74_0/boost/signals2.hpp:19:

In file included from /celibs/boost_1_74_0/boost/signals2/signal.hpp:22:

In file included from /celibs/boost_1_74_0/boost/signals2/connection.hpp:21:

/celibs/boost_1_74_0/boost/signals2/detail/auto_buffer.hpp:144:37: error: no type named 'difference_type' in 'std::__1::allocator<boost::shared_ptr<void>>'

        typedef typename Allocator::difference_type      difference_type;

                ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~

/celibs/boost_1_74_0/boost/signals2/detail/auto_buffer.hpp:143:37: error: no type named 'size_type' in 'std::__1::allocator<boost::variant<boost::shared_ptr<void>, boost::signals2::detail::foreign_void_shared_ptr>>'

        typedef typename Allocator::size_type            size_type;

                ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~

/celibs/boost_1_74_0/boost/signals2/detail/slot_call_iterator.hpp:65:27: note: in instantiation of template class 'boost::signals2::detail::auto_buffer<boost::variant<boost::shared_ptr<void>, boost::signals2::detail::foreign_void_shared_ptr>, boost::signals2::detail::store_n_objects<10>, boost::signals2::detail::default_grow_policy, std::__1::allocator<boost::variant<boost::shared_ptr<void>, boost::signals2::detail::foreign_void_shared_ptr>>>' requested here

        tracked_ptrs_type tracked_ptrs;

                          ^

In file included from <source>:1:

In file included from /celibs/boost_1_74_0/boost/signals2.hpp:19:

In file included from /celibs/boost_1_74_0/boost/signals2/signal.hpp:22:

In file included from /celibs/boost_1_74_0/boost/signals2/connection.hpp:21:

/celibs/boost_1_74_0/boost/signals2/detail/auto_buffer.hpp:144:37: error: no type named 'difference_type' in 'std::__1::allocator<boost::variant<boost::shared_ptr<void>, boost::signals2::detail::foreign_void_shared_ptr>>'

        typedef typename Allocator::difference_type      difference_type;

                ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~

4 errors generated.

Compiler returned: 1

Godbolt link: https://godbolt.org/z/cenzv1

$ clang++ --version
clang version 11.0.0 (Fedora 11.0.0-1.fc33)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
@glenfe
Copy link
Member

glenfe commented Nov 1, 2020

Resolved in #47

@glenfe glenfe closed this as completed Nov 1, 2020
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

2 participants