Re: [PATCH] libstdc++: Remove overzealous static_asserts from std::span

2020-09-21 Thread Jonathan Wakely via Gcc-patches
On 21/09/20 15:07 -0400, Patrick Palka via Libstdc++ wrote: On Mon, 21 Sep 2020, Patrick Palka wrote: For a span with empty static extent, we currently model the preconditions of front(), back(), and operator[] as if they were mandates, by using a static_assert to verify that extent != 0. This

Re: [PATCH] libstdc++: Remove overzealous static_asserts from std::span

2020-09-21 Thread Patrick Palka via Gcc-patches
On Mon, 21 Sep 2020, Patrick Palka wrote: > For a span with empty static extent, we currently model the > preconditions of front(), back(), and operator[] as if they were > mandates, by using a static_assert to verify that extent != 0. This > causes us to incorrectly reject valid programs that in