From: Patrick Palka Date: Wed, 26 Feb 2025 19:51:38 +0000 (-0500) Subject: libstdc++: Add code comment documenting LWG 4027 change [PR118083] X-Git-Tag: basepoints/gcc-16~1833 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=640697f7c2def415db81c84010ae25be0785d867;p=thirdparty%2Fgcc.git 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. --- diff --git a/libstdc++-v3/include/bits/ranges_base.h b/libstdc++-v3/include/bits/ranges_base.h index 28fe64a9e9d..516d04afdab 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) return const_cast(__r); else