diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-11-25 21:57:57 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-11-27 12:30:01 +0000 |
commit | 751f91be72d8b73a9dc71456f475268397330100 (patch) | |
tree | 4f0590e6b5dca821314aa1bad97cd468a273dcc5 /gcc/c/c-parser.cc | |
parent | 281ac0ef1001aac1b4f4223c5dbba725a5cffb43 (diff) | |
download | gcc-751f91be72d8b73a9dc71456f475268397330100.zip gcc-751f91be72d8b73a9dc71456f475268397330100.tar.gz gcc-751f91be72d8b73a9dc71456f475268397330100.tar.bz2 |
libstdc++: Simplify std::forward_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 unused member functions are preserved for the purposes of explicit
instantiations. The _M_assign function template can be removed, because
member function templates aren't instantiated by explicit instantiations
anyway.
libstdc++-v3/ChangeLog:
* include/bits/forward_list.h (operator=(forward_list&&)): Use
if constexpr instead of dispatching to _M_move_assign.
(assign(InputIterator, InputIterator)): Use if constexpr instead
of dispatching to _M_assign.
(assign(size_type, const T&)): Use if constexpr instead of
dispatching to _M_assign_n.
(_M_move_assign, _M_assign_n): Do not define for versioned
namespace.
(_M_assign): Remove.
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions