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.