diff options
author | Patrick Palka <ppalka@redhat.com> | 2020-03-09 12:10:16 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2020-03-11 00:40:33 -0400 |
commit | 8f0d8cd852255f9767626b084fc7926cbbea166f (patch) | |
tree | 3de1722b58635a50bb205d01a322b0066e6d7055 /gcc/tree-loop-distribution.c | |
parent | 5115542a5cc17c5096e6e498c363e75d5bc14276 (diff) | |
download | gcc-8f0d8cd852255f9767626b084fc7926cbbea166f.zip gcc-8f0d8cd852255f9767626b084fc7926cbbea166f.tar.gz gcc-8f0d8cd852255f9767626b084fc7926cbbea166f.tar.bz2 |
libstdc++: LWG 3286 ranges::size is not required to be valid after ...
... a call to ranges::begin on an input range.
This implements LWG 3286. The new wording for the single-argument constructor
for subrange 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 added 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.
Diffstat (limited to 'gcc/tree-loop-distribution.c')
0 files changed, 0 insertions, 0 deletions