+2020-10-21 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2020-09-22 Patrick Palka <ppalka@redhat.com>
+
+ * include/std/span (span::front): Remove static_assert.
+ (span::back): Likewise.
+ (span::operator[]): Likewise.
+ * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
+ that we check the preconditions of back() only when it's called.
+ * testsuite/23_containers/span/front_neg.cc: Likewise for
+ front().
+ * testsuite/23_containers/span/index_op_neg.cc: Likewise for
+ operator[].
+
+2020-10-21 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2020-10-12 Patrick Palka <ppalka@redhat.com>
+
+ * include/std/ranges (take_while_view::begin): Constrain the
+ const overload further as per LWG 3450.
+ (take_while_view::end): Likewise.
+ * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
+ 3450.
+
+2020-10-21 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2020-09-22 Patrick Palka <ppalka@redhat.com>
+
+ * include/bits/stl_algo.h (__sample): Exit early when the
+ input range is empty.
+ * testsuite/25_algorithms/sample/3.cc: New test.
+
+2020-10-21 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2020-09-22 Patrick Palka <ppalka@redhat.com>
+
+ * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
+ (search): Likewise for the overload that takes a searcher.
+ * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
+ std::for_each_n.
+ * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
+ std::search overload that takes a searcher.
+
+2020-10-21 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2020-08-27 Patrick Palka <ppalka@redhat.com>
+
+ PR libstdc++/95322
+ * include/std/ranges (transform_view::sentinel::__distance_from):
+ Give this a deduced return type.
+ (transform_view::sentinel::operator-): Adjust the return type so
+ that it's based on the constness of the iterator rather than
+ that of the sentinel.
+ * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
+
+2020-10-21 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2020-08-27 Patrick Palka <ppalka@redhat.com>
+
+ * include/std/ranges (elements_view::begin): Adjust constraints.
+ (elements_view::end): Likewise.
+ (elements_view::_Sentinel::operator==): Templatize to take both
+ _Iterator<true> and _Iterator<false>.
+ (elements_view::_Sentinel::operator-): Likewise.
+ * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
+ the example from P1994R1.
+ * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
+
+2020-10-21 Patrick Palka <ppalka@redhat.com>
+
+ Backported from master:
+ 2020-08-27 Patrick Palka <ppalka@redhat.com>
+
+ * include/std/ranges (elements_view::end): Replace these two
+ overloads with four new overloads.
+ (elements_view::_Iterator::operator==): Remove.
+ (elements_view::_Iterator::operator-): Likewise.
+ (elements_view::_Sentinel): Define.
+
2020-10-20 Jonathan Wakely <jwakely@redhat.com>
Backported from master: