diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-10-21 14:40:54 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-10-21 14:40:54 +0100 |
commit | a186ab670e97c4c3883d96506655c4621e7c5515 (patch) | |
tree | 8936f3809ef772d3acbf611f1a729583ec8bca2e /gcc/config.gcc | |
parent | e957b86ca26f9a4e49acf625ed397e7dd05b0d66 (diff) | |
download | gcc-a186ab670e97c4c3883d96506655c4621e7c5515.zip gcc-a186ab670e97c4c3883d96506655c4621e7c5515.tar.gz gcc-a186ab670e97c4c3883d96506655c4621e7c5515.tar.bz2 |
libstdc++: Make structured bindings always work for subranges [PR 97512]
The definition of ranges::subrange was moved to the new
<bits/ranges_util.h> header so that it could be used in <algorithm>
without including the whole of <ranges>. However, the tuple-like support
that enables subrange to be used with structured bindings was left in
<ranges>. This is arguably conforming (to use a subrange you should
include <ranges>) but it's inconvenient and probably confusing.
This change makes the tuple-like support available whenever subrange
itself is available.
libstdc++-v3/ChangeLog:
PR libstdc++/97512
* include/bits/ranges_util.h (tuple_size<subrange>)
(tuple_element<I, cv subrange>): Move here from ...
* include/std/ranges: ... here.
* testsuite/std/ranges/subrange/97512.cc: New test.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions