diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2024-11-28 12:32:59 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2024-12-02 19:38:57 +0000 |
commit | 1467409beb27a693e96994899f30e4db015b5c2c (patch) | |
tree | 9e3d113b6fd05d7345ec6fd0b7e5761568d4c275 /libstdc++-v3/include/std | |
parent | 4df8e6fc0cbc8358f88e81bb64b790af2a848a35 (diff) | |
download | gcc-1467409beb27a693e96994899f30e4db015b5c2c.zip gcc-1467409beb27a693e96994899f30e4db015b5c2c.tar.gz gcc-1467409beb27a693e96994899f30e4db015b5c2c.tar.bz2 |
libstdc++: Simplify std::_Destroy using 'if constexpr'
This is another place where we can use 'if constexpr' to replace
dispatching to a specialized class template, improving compile times and
avoiding a function call.
libstdc++-v3/ChangeLog:
* include/bits/stl_construct.h (_Destroy(FwdIter, FwdIter)): Use
'if constexpr' instead of dispatching to a member function of a
class template.
(_Destroy_n(FwdIter, Size)): Likewise.
(_Destroy_aux, _Destroy_n_aux): Only define for C++98.
Reviewed-by: Patrick Palka <ppalka@redhat.com>
Diffstat (limited to 'libstdc++-v3/include/std')
0 files changed, 0 insertions, 0 deletions