https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107371

            Bug ID: 107371
           Summary: __adaptor::_RangeAdaptor rejects the explicit move
                    constructor case
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

libstdc++ rejects the following code:

#include <ranges>

struct A {
  A() = default;
  explicit A(A&&) { }
  operator int() { return 5; }
};

int main() {
  auto r = std::views::iota(0) | std::views::take(A{});
}

https://godbolt.org/z/EEarj7he8

Reply via email to