Skip to content

Commit 640697f

Browse files
author
Patrick Palka
committed
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.
1 parent ad2908e commit 640697f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,8 @@ namespace ranges
646646
constexpr auto&
647647
__possibly_const_range(_Range& __r) noexcept
648648
{
649+
// _GLIBCXX_RESOLVE_LIB_DEFECTS
650+
// 4027. possibly-const-range should prefer returning const R&
649651
if constexpr (input_range<const _Range>)
650652
return const_cast<const _Range&>(__r);
651653
else

0 commit comments

Comments
 (0)