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

common_iterator: expose iterator_traits aliases #1660

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

theodelrieu
Copy link
Contributor

@theodelrieu theodelrieu commented Sep 20, 2021

Boost.Move own iterator_traits fails to compile when using ranges::to<flat_map>, as it relies on the iterator's member types.

EDIT: example output

/Users/theo/.conan/data/boost/1.76.0/_/_/package/aab501a79b7a20cf10f7293cf64da1317989934c/include/boost/move/detail/iterator_traits.hpp:46:31: error: no type named 'value_type' in 'ranges::common_iterator<ranges::basic_iterator<ranges::adaptor_cursor<ranges::basic_iterator<ranges::group_by_view<ranges::ref_view<const std::__1::vector<boost::variant2::variant<Tanker::Trustchain::Actions::UserGroupAddition, Tanker::Trustchain::Actions::UserGroupCreation>>>, (lambda at ../../modules/sdk-core/src/Groups/Accessor.cpp:153:36)>::cursor>, ranges::iter_transform_view<ranges::group_by_view<ranges::ref_view<const std::__1::vector<boost::variant2::variant<Tanker::Trustchain::Actions::UserGroupAddition, Tanker::Trustchain::Actions::UserGroupCreation>>>, (lambda at ../../modules/sdk-core/src/Groups/Accessor.cpp:153:36)>, ranges::indirected<(lambda at ../../modules/sdk-core/src/Groups/Accessor.cpp:156:37)>>::adaptor<false>>>, ranges::adaptor_sentinel<ranges::default_sentinel_t, ranges::adaptor_base>>'
   typedef typename Iterator::value_type        value_type;
           ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
/Users/theo/.conan/data/boost/1.76.0/_/_/package/aab501a79b7a20cf10f7293cf64da1317989934c/include/boost/container/vector.hpp:2003:22: note: in instantiation of template class 'boost::movelib::iterator_traits<ranges::common_iterator<ranges::basic_iterator<ranges::adaptor_cursor<ranges::basic_iterator<ranges::group_by_view<ranges::ref_view<const std::__1::vector<boost::variant2::variant<Tanker::Trustchain::Actions::UserGroupAddition, Tanker::Trustchain::Actions::UserGroupCreation>>>, (lambda at ../../modules/sdk-core/src/Groups/Accessor.cpp:153:36)>::cursor>, ranges::iter_transform_view<ranges::group_by_view<ranges::ref_view<const std::__1::vector<boost::variant2::variant<Tanker::Trustchain::Actions::UserGroupAddition, Tanker::Trustchain::Actions::UserGroupCreation>>>, (lambda at ../../modules/sdk-core/src/Groups/Accessor.cpp:153:36)>, ranges::indirected<(lambda at ../../modules/sdk-core/src/Groups/Accessor.cpp:156:37)>>::adaptor<false>>>, ranges::adaptor_sentinel<ranges::default_sentinel_t, ranges::adaptor_base>>>' requested here
      const typename iterator_traits<FwdIt>::size_type sz = boost::container::iterator_distance(first, last);

I've opened boostorg/move#43 to fix further Boost.Move releases.

Boost.Move own iterator_traits fail to compile when using
ranges::to<flat_map>, as it relies on the iterator's member types.
@brevzin
Copy link
Collaborator

brevzin commented Jun 2, 2022

Can you (a) provide a full example that fails with (b) a standalone test case that demonstrates the current failure that would pass with these changes? Ion said he couldn't reproduce it, and it's not clear to me what the issue is.

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

Successfully merging this pull request may close these issues.

None yet

2 participants