[Bug c++/95100] <ranges> xxx_view adaptors don't work with pipeline operator

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri May 15 14:10:30 GMT 2020


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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to rhalbersma from comment #0)
> Combining the std::ranges::xxx_view adaptors with the pipeline operator does
> not compile, in contrast to the supposedly expression equivalent
> std::ranges:views::xxx 

Hmm, I don't see anything in the spec that would imply views::xxx should be
expression-equivalent to xxx_view.  What I see is that views::xxx(E) is, for
some values of E, expression-equivalent to xxx_view{E}.

For instance [range.reverse.overview] says:

   Given a subexpression E, the expression views​::​reverse(E) is
expression-equivalent to: 
   [...]
   - Otherwise, equivalent to reverse_­view{E}.

Could you point me to the relevant bits of the spec that would imply this
stronger expression-equivalence?


More information about the Gcc-bugs mailing list