aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Grosheintz <luc.grosheintz@gmail.com>2025-09-03 17:28:27 +0200
committerTomasz KamiƄski <tkaminsk@redhat.com>2025-09-04 11:55:02 +0200
commit43a8c0f8e67f282823a3af1df4cd77dd86981b9c (patch)
tree8f7b3a2a57bd331e26f50f136b7876a77f38560b
parenta7fe8f83bf89704e278c1db30f51d6bb26bf0e69 (diff)
downloadgcc-43a8c0f8e67f282823a3af1df4cd77dd86981b9c.zip
gcc-43a8c0f8e67f282823a3af1df4cd77dd86981b9c.tar.gz
gcc-43a8c0f8e67f282823a3af1df4cd77dd86981b9c.tar.bz2
libstdc++: Add _GLIBCXX_RESOLVE_LIB_DEFECTS for 4314 in <mdspan>.
In r16-2328-g29d53f6213e0a1 we fixed a bug related to user-defined objects that can convert to an integers only via an rvalue reference. The same commit also implemented LWG 4314 [1], but didn't mark it with _GLIBCXX_RESOLVE_LIB_DEFECTS. This commit adds the missing markers. [1]: https://cplusplus.github.io/LWG/issue4314 It also fixes one cases of trailing white-space near a ctor for aligned_accessor. libstdc++-v3/ChangeLog: * include/std/mdspan (layout_left::mapping::operator()): Add _GLIBCXX_RESOLVE_LIB_DEFECTS marker for 4314. (layout_left::mapping::operator()): Ditto. (layout_stride::mapping::operator()): Ditto. Reviewed-by: Jonathan Wakely <jwakely@redhat.com> Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
-rw-r--r--libstdc++-v3/include/std/mdspan8
1 files changed, 7 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/mdspan b/libstdc++-v3/include/std/mdspan
index 6c7469c..678b261 100644
--- a/libstdc++-v3/include/std/mdspan
+++ b/libstdc++-v3/include/std/mdspan
@@ -727,6 +727,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
required_span_size() const noexcept
{ return __mdspan::__size(_M_extents); }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 4314. Missing move in mdspan layout mapping::operator()
template<__mdspan::__valid_index_type<index_type>... _Indices>
requires (sizeof...(_Indices) == extents_type::rank())
constexpr index_type
@@ -866,6 +868,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
required_span_size() const noexcept
{ return __mdspan::__size(_M_extents); }
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 4314. Missing move in mdspan layout mapping::operator()
template<__mdspan::__valid_index_type<index_type>... _Indices>
requires (sizeof...(_Indices) == extents_type::rank())
constexpr index_type
@@ -1089,6 +1093,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
return __ret;
}
+ // _GLIBCXX_RESOLVE_LIB_DEFECTS
+ // 4314. Missing move in mdspan layout mapping::operator()
template<__mdspan::__valid_index_type<index_type>... _Indices>
requires (sizeof...(_Indices) == extents_type::rank())
constexpr index_type
@@ -1208,7 +1214,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
aligned_accessor() noexcept = default;
template<typename _OElementType, size_t _OByteAlignment>
- requires (_OByteAlignment >= byte_alignment)
+ requires (_OByteAlignment >= byte_alignment)
&& is_convertible_v<_OElementType(*)[], element_type(*)[]>
constexpr
aligned_accessor(aligned_accessor<_OElementType, _OByteAlignment>)