diff options
author | Patrick Palka <ppalka@redhat.com> | 2025-02-26 14:51:38 -0500 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2025-02-26 14:51:38 -0500 |
commit | 640697f7c2def415db81c84010ae25be0785d867 (patch) | |
tree | e7dacbc6e907e48d7bc4bbb467f153368d8014d7 | |
parent | ad2908ed4ec5eff3cad3fd142cde5c1fac4788e9 (diff) | |
download | gcc-640697f7c2def415db81c84010ae25be0785d867.zip gcc-640697f7c2def415db81c84010ae25be0785d867.tar.gz gcc-640697f7c2def415db81c84010ae25be0785d867.tar.bz2 |
libstdc++: Add code comment documenting LWG 4027 change [PR118083]
PR libstdc++/118083
libstdc++-v3/ChangeLog:
* include/bits/ranges_base.h
(ranges::__access::__possibly_const_range): Mention LWG 4027.
-rw-r--r-- | libstdc++-v3/include/bits/ranges_base.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/ranges_base.h b/libstdc++-v3/include/bits/ranges_base.h index 28fe64a..516d04a 100644 --- a/libstdc++-v3/include/bits/ranges_base.h +++ b/libstdc++-v3/include/bits/ranges_base.h @@ -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 |