From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6E6E13854814; Sat, 24 Apr 2021 01:46:50 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E6E13854814 From: "nok.raven at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100243] New: [10 Regression] invalid use of incomplete type 'std::__detail::__iter_traits >' {aka 'struct std::indirectly_readable_traits'} Date: Sat, 24 Apr 2021 01:46:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 10.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: nok.raven at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Apr 2021 01:46:50 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100243 Bug ID: 100243 Summary: [10 Regression] invalid use of incomplete type 'std::__detail::__iter_traits >' {aka 'struct std::indirectly_readable_traits'} Product: gcc Version: 10.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: nok.raven at gmail dot com Target Milestone: --- // g++-10 -std=3Dc++2a #include #include int main() { boost::unordered_multiset a, b; b.insert(std::make_move_iterator(a.begin()), std::make_move_iterator(b.begin())); } ``` In file included from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/stl_iterator_base= _types.h:71, from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/stl_algobase.h:65, from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/array:40, from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/tuple:39, from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/functional:54, from /opt/compiler-explorer/libs/boost_1_75_0/boost/container_hash/hash.hpp:20, from /opt/compiler-explorer/libs/boost_1_75_0/boost/functional/hash.hpp:6, from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 18, from :1: /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h: In substitution of 'template using __iter_value_t =3D typename std::__detail::__iter_traits_impl<_Tp, std::indirectly_readable_traits<_Ite= r> >::type::value_type [with _Tp =3D boost::unordered::iterator_detail::c_iterator > >]': /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:259:11: required by substitution of 'template using iter_value_t =3D std::__detail::__iter_value_t::type>::type> [with _Tp =3D boost::unordered::iterator_detail::c_iterator > >]' /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/stl_iterator.h:13= 01:13: required from 'class std::move_iterator > > >' :7:47: required from here /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:254:13: error: ambiguous template instantiation for 'struct std::indirectly_readable_traits > > >' 254 | using __iter_value_t =3D typename | ^~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:242:12: note: candidates are: 'template requires requires{typename _Tp::value_type;} struct std::indirectly_readable_traits<_Iter> [with _Tp = =3D boost::unordered::iterator_detail::c_iterator > >]' 242 | struct indirectly_readable_traits<_Tp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:247:12: note: 'template requires requires{typename _Tp::element_type;} struct std::indirectly_readable_traits<_Iter> [with _Tp= =3D boost::unordered::iterator_detail::c_iterator > >]' 247 | struct indirectly_readable_traits<_Tp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:254:13: error: invalid use of incomplete type 'std::__detail::__iter_traits > >, std::indirectly_readable_traits > > > >' {aka 'struct std::indirectly_readable_traits > > >'} 254 | using __iter_value_t =3D typename | ^~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:225:29: note: declaration of 'std::__detail::__iter_traits > >, std::indirectly_readable_traits > > > >' {aka 'struct std::indirectly_readable_traits > > >'} 225 | template struct indirectly_readable_traits { }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/set.hpp:6, from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 20, from :1: /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp: In instantiation of 'struct boost::unordered::detail::is_forward > > > >': /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:273:14: required from 'struct boost::unordered::detail::disable_if_forward > > >, void*>' /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4364:14: required by substitution of 'template void boost::unordered::detail::table >, std::__cxx11::basic_string, boost::hash >, std::equal_to > > >::insert_range_equiv= (I, I, typename boost::unordered::detail::disable_if_forward::type) [= with I =3D std::move_iterator > > >]' /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 1714:32: required from 'void boost::unordered::unordered_multiset::insert(InputIt, InputIt) [with InputIt =3D std::move_iterator > > >; T =3D std::__cxx11::basic_string; H =3D boost::hash >; P =3D std::equal_to >; A =3D std::allocator >]' :7:84: required from here /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:260:14: error: no type named 'iterator_category' in 'struct std::iterator_traits > > > >' 260 | struct is_forward : boost::is_base_of > > >, void*>': /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4364:14: required by substitution of 'template void boost::unordered::detail::table >, std::__cxx11::basic_string, boost::hash >, std::equal_to > > >::insert_range_equiv= (I, I, typename boost::unordered::detail::disable_if_forward::type) [= with I =3D std::move_iterator > > >]' /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 1714:32: required from 'void boost::unordered::unordered_multiset::insert(InputIt, InputIt) [with InputIt =3D std::move_iterator > > >; T =3D std::__cxx11::basic_string; H =3D boost::hash >; P =3D std::equal_to >; A =3D std::allocator >]' :7:84: required from here /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:273:14: error: 'value' is not a member of 'boost::unordered::detail::is_forward > > > >' 273 | struct disable_if_forward | ^~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp: In instantiation of 'struct boost::unordered::detail::enable_if_forward > > >, void*>': /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4340:14: required by substitution of 'template void boost::unordered::detail::table >, std::__cxx11::basic_string, boost::hash >, std::equal_to > > >::insert_range_equiv= (I, I, typename boost::unordered::detail::enable_if_forward::type) [w= ith I =3D std::move_iterator > > >]' /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 1714:32: required from 'void boost::unordered::unordered_multiset::insert(InputIt, InputIt) [with InputIt =3D std::move_iterator > > >; T =3D std::__cxx11::basic_string; H =3D boost::hash >; P =3D std::equal_to >; A =3D std::allocator >]' :7:84: required from here /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:266:14: error: 'value' is not a member of 'boost::unordered::detail::is_forward > > > >' 266 | struct enable_if_forward | ^~~~~~~~~~~~~~~~~ In file included from :1: /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= In instantiation of 'void boost::unordered::unordered_multiset::insert(InputIt, InputIt) [with InputIt =3D std::move_iterator > > >; T =3D std::__cxx11::basic_string; H =3D boost::hash >; P =3D std::equal_to >; A =3D std::allocator >]': :7:84: required from here /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 1714:32: error: no matching function for call to 'boost::unordered::detail::table >, std::__cxx11::basic_string, boost::hash >, std::equal_to > > >::insert_range_equiv(std::move_iterator > > >&, std::move_iterator > > >&)' 1714 | table_.insert_range_equiv(first, last); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/set.hpp:6, from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 20, from :1: /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4340:14: note: candidate: 'template void boost::unordered::detail::table::insert_range_equiv(I, I, typename boost::unordered::detail::enable_if_forward::type) [with I =3D I;= Types =3D boost::unordered::detail::set >, std::__cxx11::basic_string, boost::hash >, std::equal_to > >]' 4340 | void insert_range_equiv(I i, I j, | ^~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4340:14: note: substitution of deduced template arguments resulted in errors seen above /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4364:14: note: candidate: 'template void boost::unordered::detail::table::insert_range_equiv(I, I, typename boost::unordered::detail::disable_if_forward::type) [with I =3D I; Types =3D boost::unordered::detail::set >, std::__cxx11::basic_string, boost::hash >, std::equal_to > >]' 4364 | void insert_range_equiv(I i, I j, | ^~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4364:14: note: substitution of deduced template arguments resulted in errors seen above ASM generation compiler returned: 1 In file included from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/stl_iterator_base= _types.h:71, from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/stl_algobase.h:65, from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/array:40, from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/tuple:39, from /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/functional:54, from /opt/compiler-explorer/libs/boost_1_75_0/boost/container_hash/hash.hpp:20, from /opt/compiler-explorer/libs/boost_1_75_0/boost/functional/hash.hpp:6, from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 18, from :1: /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h: In substitution of 'template using __iter_value_t =3D typename std::__detail::__iter_traits_impl<_Tp, std::indirectly_readable_traits<_Ite= r> >::type::value_type [with _Tp =3D boost::unordered::iterator_detail::c_iterator > >]': /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:259:11: required by substitution of 'template using iter_value_t =3D std::__detail::__iter_value_t::type>::type> [with _Tp =3D boost::unordered::iterator_detail::c_iterator > >]' /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/stl_iterator.h:13= 01:13: required from 'class std::move_iterator > > >' :7:47: required from here /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:254:13: error: ambiguous template instantiation for 'struct std::indirectly_readable_traits > > >' 254 | using __iter_value_t =3D typename | ^~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:242:12: note: candidates are: 'template requires requires{typename _Tp::value_type;} struct std::indirectly_readable_traits<_Iter> [with _Tp = =3D boost::unordered::iterator_detail::c_iterator > >]' 242 | struct indirectly_readable_traits<_Tp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:247:12: note: 'template requires requires{typename _Tp::element_type;} struct std::indirectly_readable_traits<_Iter> [with _Tp= =3D boost::unordered::iterator_detail::c_iterator > >]' 247 | struct indirectly_readable_traits<_Tp> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:254:13: error: invalid use of incomplete type 'std::__detail::__iter_traits > >, std::indirectly_readable_traits > > > >' {aka 'struct std::indirectly_readable_traits > > >'} 254 | using __iter_value_t =3D typename | ^~~~~~~~~~~~~~ /opt/compiler-explorer/gcc-10.3.0/include/c++/10.3.0/bits/iterator_concepts= .h:225:29: note: declaration of 'std::__detail::__iter_traits > >, std::indirectly_readable_traits > > > >' {aka 'struct std::indirectly_readable_traits > > >'} 225 | template struct indirectly_readable_traits { }; | ^~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/set.hpp:6, from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 20, from :1: /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp: In instantiation of 'struct boost::unordered::detail::is_forward > > > >': /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:273:14: required from 'struct boost::unordered::detail::disable_if_forward > > >, void*>' /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4364:14: required by substitution of 'template void boost::unordered::detail::table >, std::__cxx11::basic_string, boost::hash >, std::equal_to > > >::insert_range_equiv= (I, I, typename boost::unordered::detail::disable_if_forward::type) [= with I =3D std::move_iterator > > >]' /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 1714:32: required from 'void boost::unordered::unordered_multiset::insert(InputIt, InputIt) [with InputIt =3D std::move_iterator > > >; T =3D std::__cxx11::basic_string; H =3D boost::hash >; P =3D std::equal_to >; A =3D std::allocator >]' :7:84: required from here /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:260:14: error: no type named 'iterator_category' in 'struct std::iterator_traits > > > >' 260 | struct is_forward : boost::is_base_of > > >, void*>': /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4364:14: required by substitution of 'template void boost::unordered::detail::table >, std::__cxx11::basic_string, boost::hash >, std::equal_to > > >::insert_range_equiv= (I, I, typename boost::unordered::detail::disable_if_forward::type) [= with I =3D std::move_iterator > > >]' /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 1714:32: required from 'void boost::unordered::unordered_multiset::insert(InputIt, InputIt) [with InputIt =3D std::move_iterator > > >; T =3D std::__cxx11::basic_string; H =3D boost::hash >; P =3D std::equal_to >; A =3D std::allocator >]' :7:84: required from here /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:273:14: error: 'value' is not a member of 'boost::unordered::detail::is_forward > > > >' 273 | struct disable_if_forward | ^~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp: In instantiation of 'struct boost::unordered::detail::enable_if_forward > > >, void*>': /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4340:14: required by substitution of 'template void boost::unordered::detail::table >, std::__cxx11::basic_string, boost::hash >, std::equal_to > > >::insert_range_equiv= (I, I, typename boost::unordered::detail::enable_if_forward::type) [w= ith I =3D std::move_iterator > > >]' /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 1714:32: required from 'void boost::unordered::unordered_multiset::insert(InputIt, InputIt) [with InputIt =3D std::move_iterator > > >; T =3D std::__cxx11::basic_string; H =3D boost::hash >; P =3D std::equal_to >; A =3D std::allocator >]' :7:84: required from here /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:266:14: error: 'value' is not a member of 'boost::unordered::detail::is_forward > > > >' 266 | struct enable_if_forward | ^~~~~~~~~~~~~~~~~ In file included from :1: /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= In instantiation of 'void boost::unordered::unordered_multiset::insert(InputIt, InputIt) [with InputIt =3D std::move_iterator > > >; T =3D std::__cxx11::basic_string; H =3D boost::hash >; P =3D std::equal_to >; A =3D std::allocator >]': :7:84: required from here /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 1714:32: error: no matching function for call to 'boost::unordered::detail::table >, std::__cxx11::basic_string, boost::hash >, std::equal_to > > >::insert_range_equiv(std::move_iterator > > >&, std::move_iterator > > >&)' 1714 | table_.insert_range_equiv(first, last); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~ In file included from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/set.hpp:6, from /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/unordered_set.hpp:= 20, from :1: /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4340:14: note: candidate: 'template void boost::unordered::detail::table::insert_range_equiv(I, I, typename boost::unordered::detail::enable_if_forward::type) [with I =3D I;= Types =3D boost::unordered::detail::set >, std::__cxx11::basic_string, boost::hash >, std::equal_to > >]' 4340 | void insert_range_equiv(I i, I j, | ^~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4340:14: note: substitution of deduced template arguments resulted in errors seen above /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4364:14: note: candidate: 'template void boost::unordered::detail::table::insert_range_equiv(I, I, typename boost::unordered::detail::disable_if_forward::type) [with I =3D I; Types =3D boost::unordered::detail::set >, std::__cxx11::basic_string, boost::hash >, std::equal_to > >]' 4364 | void insert_range_equiv(I i, I j, | ^~~~~~~~~~~~~~~~~~ /opt/compiler-explorer/libs/boost_1_75_0/boost/unordered/detail/implementat= ion.hpp:4364:14: note: substitution of deduced template arguments resulted in errors seen above Execution build compiler returned: 1 ``` It works on 9 and 11 though. Could a fix be backported to 10? https://godbolt.org/z/Mzd3TaM4Y=