https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95100
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|UNCONFIRMED |RESOLVED --- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> --- No, it's not a rewriting rule. It says that the library implementation needs to give range adaptor objects an overloaded operator| that allows them to be used that way. There's no magical rewriting going on, just operator overloading. You can't overload an operator to take a class template as an argument. Class templates are not objects and objects are not class templates. Not a bug and not a defect.