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

            Bug ID: 99433
           Summary: custom friend pipe-operator| conflicts with range
                    adaptor?
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gcc-bugs at marehr dot dialup.fu-berlin.de
  Target Milestone: ---

Hello gcc-team,

the following code does not compile with gcc-11 any more, but did with gcc-10.

```c++
#include <ranges>
#include <vector>
template <typename underlying_adaptor_t>
struct deep {
    underlying_adaptor_t adaptor;

    template <typename range_t>
    friend auto operator|(range_t &range, deep const &me)
    {
        return me.adaptor(range[0]);
    }
};
inline auto const complement = deep{std::views::transform([](auto const nucl) {
return nucl + ' '; })};
std::vector<std::vector<char>> foo{};
auto v = foo | complement;
```

https://godbolt.org/z/9oEj9T

Thank you!
  • [Bug c++/99433] Ne... gcc-bugs at marehr dot dialup.fu-berlin.de via Gcc-bugs

Reply via email to