libstdc++: Also disable caching of reverse_view::begin() for common_ranges
authorPatrick Palka <ppalka@redhat.com>
Fri, 28 Feb 2020 15:47:26 +0000 (10:47 -0500)
committerPatrick Palka <ppalka@redhat.com>
Fri, 28 Feb 2020 16:55:58 +0000 (11:55 -0500)
commit77e596cf3c1b7bc11ba946394ed8d62a49157b49
tree6b6a0525d9558bd1e6a2c1f5b09f83b0e4e5dad0
parent08bf7bde9f2987b1c623d272cc71fc14a1622442
libstdc++: Also disable caching of reverse_view::begin() for common_ranges

When the underlying range models common_range, then reverse_view::begin() is
already O(1) without caching.  So we should disable the cache in this case too.

libstdc++-v3/ChangeLog:

* include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
whenever the underlying range models common_range.
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/ranges