On 09/03/20 14:17 -0400, Patrick Palka wrote:
... a call to ranges::begin on an input range.
This implements LWG 3286. The new wording for the single-argument
subrange::subrange constructor is implemented by splitting the constructor into
two delegating constructors, one constrained by _S_store_size and the other by
!_S_store_size.
Tested on x86_64-pc-linux-gnu, both tests fail before the patch and pass with
the patch.
libstdc++-v3/ChangeLog:
LWG 3286 ranges::size is not required to be valid after a call to
ranges::begin on an input range
* include/std/ranges (subrange::subrange): Split single-argument
constructor into two, one constrained by _S_store_size and another by
!_S_store_size.
(take_view::begin): Call size() before calling ranges::begin(_M_base).
* testsuite/std/ranges/adaptors/lwg3286.cc: New test.
* testsuite/std/ranges/subrange/lwg3286.cc: New test.
OK, thanks.