https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116095
Bug ID: 116095 Summary: satisfaction of atomic constraint depends on itself, when piping boost range into range-v3 Product: gcc Version: 14.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: enricomaria.dean6elis at gmail dot com Target Milestone: --- Here's a simple example that fails to compile with GCC if -std=c++20 is passed. It compiles with -std=c++17 with GCC. It compiles in both cases with Clang. #include <boost/range/iterator_range.hpp> #include <functional> #include <list> #include <range/v3/range/conversion.hpp> #include <range/v3/view/transform.hpp> #include <vector> using namespace ranges; using namespace ranges::views; int main() { std::list<int> v; auto r = boost::make_iterator_range(v); auto w = r | transform([](auto x){ return x; }) | to_vector; } Initially, I had tried to squeeze the example a bit more, and got to the following: #include <boost/range/iterator_range_core.hpp> #include <list> #include <range/v3/view/ref.hpp> int main() { std::list<int> l; using Foo = const ranges::ref_view<boost::iterator_range<decltype(l.begin())>>&; ranges::_size_::has_non_member_size<Foo>; } for which GCC <= 10.5 would compile. I haven't received any useful reply/comment on stackoverflow (https://stackoverflow.com/questions/78699349/why-gcc-11-1-rejects-range-v3-c20-concept-applied-to-ref-view-of-boostiterat), nor or range-v3 github repo (https://github.com/ericniebler/range-v3/issues/1823). Here's a compiler explorer example: https://godbolt.org/ More info is at the stackoverflow question I linked.