C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Is that a compiler bug or unspecified behavior?

From: Arthur O'Dwyer <arthur.j.odwyer_at_[hidden]>
Date: Thu, 6 Jul 2023 12:13:51 -0400
On Thu, Jul 6, 2023 at 12:01 PM hjj k via Std-Proposals <
std-proposals_at_[hidden]> wrote:

> I have tested the code below in Clang, GCC and MSVC compiler.
>
> Code #1:
> auto& operator<< ( auto& os, auto&& iter )
> requires requires {
> { os << *iter.begin() } -> same_as<decltype( os )>;
> }
> {
> /* ... */
> }
> Only works on MSVC compiler.
>

Nope, works fine for me: https://godbolt.org/z/hYPsKandn
But this is not on-topic for std-proposals. Please take it to a more
appropriate venue, such as the C++ Slack
https://cppalliance.org/slack/

–Arthur

Received on 2023-07-06 16:14:04