]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Add code comment documenting LWG 4027 change [PR118083]
authorPatrick Palka <ppalka@redhat.com>
Wed, 26 Feb 2025 19:51:38 +0000 (14:51 -0500)
committerPatrick Palka <ppalka@redhat.com>
Wed, 26 Feb 2025 19:51:38 +0000 (14:51 -0500)
PR libstdc++/118083

libstdc++-v3/ChangeLog:

* include/bits/ranges_base.h
(ranges::__access::__possibly_const_range): Mention LWG 4027.

libstdc++-v3/include/bits/ranges_base.h

index 28fe64a9e9da9ce7bcd9390e51a9a15ac394e581..516d04afdab263c4444488728a6dbdcb83bc6653 100644 (file)
@@ -646,6 +646,8 @@ namespace ranges
       constexpr auto&
       __possibly_const_range(_Range& __r) noexcept
       {
+       // _GLIBCXX_RESOLVE_LIB_DEFECTS
+       // 4027. possibly-const-range should prefer returning const R&
        if constexpr (input_range<const _Range>)
          return const_cast<const _Range&>(__r);
        else