aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-07-11 20:38:05 +0100
committerJonathan Wakely <redi@gcc.gnu.org>2024-10-09 13:39:15 +0100
commit2eaae1bd69302efe6d73d8d63739b081299f8641 (patch)
tree7d0397a0d17bd9be3fe8743293e27cff0846521a /libstdc++-v3/include/std
parent993deb3a9a4eb78b05587f9b2f9d83a4ccc60c74 (diff)
downloadgcc-2eaae1bd69302efe6d73d8d63739b081299f8641.zip
gcc-2eaae1bd69302efe6d73d8d63739b081299f8641.tar.gz
gcc-2eaae1bd69302efe6d73d8d63739b081299f8641.tar.bz2
libstdc++: Do not cast away const-ness in std::construct_at (LWG 3870)
This change also requires implementing the proposed resolution of LWG 3216 so that std::make_shared and std::allocate_shared still work, and the proposed resolution of LWG 3891 so that std::expected still works. libstdc++-v3/ChangeLog: * include/bits/shared_ptr_base.h: Remove cv-qualifiers from type managed by _Sp_counted_ptr_inplace, as per LWG 3210. * include/bits/stl_construct.h: Do not cast away cv-qualifiers when passing pointer to placement new. * include/std/expected: Use remove_cv_t for union member, as per LWG 3891. * testsuite/20_util/allocator/void.cc: Do not test construction via const pointer.
Diffstat (limited to 'libstdc++-v3/include/std')
-rw-r--r--libstdc++-v3/include/std/expected2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/std/expected b/libstdc++-v3/include/std/expected
index 9e92339..d4a4bc1 100644
--- a/libstdc++-v3/include/std/expected
+++ b/libstdc++-v3/include/std/expected
@@ -1261,7 +1261,7 @@ namespace __expected
{ }
union {
- _Tp _M_val;
+ remove_cv_t<_Tp> _M_val;
_Er _M_unex;
};