aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-11-25 21:57:57 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2024-11-27 12:30:00 +0000
commit281ac0ef1001aac1b4f4223c5dbba725a5cffb43 (patch)
tree8d5295dea61f4ba66002e54133e5d376c7975e23 /gcc/c
parent498f9aefbf36b0e3f119d634c41d86699ce6fed2 (diff)
downloadgcc-281ac0ef1001aac1b4f4223c5dbba725a5cffb43.zip
gcc-281ac0ef1001aac1b4f4223c5dbba725a5cffb43.tar.gz
gcc-281ac0ef1001aac1b4f4223c5dbba725a5cffb43.tar.bz2
libstdc++: Simplify std::list assignment using 'if constexpr'
Use diagnostic pragmas to allow using `if constexpr` in C++11 mode, so that we don't need to use tag dispatching. The _M_move_assign overloads that were previously used for tag dispatching are no longer used, but are retained here (at least for the default config) so that an explicit instantiation will still define those members. This ensures that old code which expects an explicit instantiation in some other translation unit will still link. I'm not sure if that's really needed, we should probably have a policy about whether we support explicit instantiations where the declaration and definition use different versions of the headers. libstdc++-v3/ChangeLog: * include/bits/stl_list.h (operator=(list&&)): Use if constexpr instead of dispatching to _M_move_assign. (_M_move_assign): Do not define for versioned namespace.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions