aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/std/numeric
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2024-11-12 15:36:17 +0000
committerJonathan Wakely <redi@gcc.gnu.org>2024-12-03 21:34:24 +0000
commitca24f585fc3b7bf5e145cf3ee3f6f83ad8a4f2dd (patch)
tree5990f7f2786e00bc5a8e7cc42ca7bebba045dc89 /libstdc++-v3/include/std/numeric
parent5aa4ab4d62f4b6c6e1b0ceb746582bdac3bb14a9 (diff)
downloadgcc-ca24f585fc3b7bf5e145cf3ee3f6f83ad8a4f2dd.zip
gcc-ca24f585fc3b7bf5e145cf3ee3f6f83ad8a4f2dd.tar.gz
gcc-ca24f585fc3b7bf5e145cf3ee3f6f83ad8a4f2dd.tar.bz2
libstdc++: Refactor std::list::size() for cxx11 ABI
Remove some preprocessor conditionals by moving the _M_size member for the cxx11 ABI into a new base class, which is empty for the gcc4-compat ABI. Move some unused members that are only retained for ABI compatibility to the end of _List_base and add an explanatory comment. Stop using list::_M_node_count and list::_D_distance and then move them to the end of std::list with a comment too. libstdc++-v3/ChangeLog: * include/bits/stl_list.h (_List_size): New struct. (_List_node_header): Replace _M_size member with _List_size base class. (_List_node_header(_List_node_header&&)): Replace explicit uses of _M_size with initializing the base. (_List_node_header::_M_init): Likewise. (_List_base::_S_distance, _List_base::_M_distance) (_List_base::_M_node_count): Move to end of class body and add comment. (list::_S_distance, list::_M_node_count): Likewise. (list::size): Inline _M_node_count effects to here. (list::splice(iterator, list&, iterator, iterator)): Use #if and call std::distance instead of _S_distance.
Diffstat (limited to 'libstdc++-v3/include/std/numeric')
0 files changed, 0 insertions, 0 deletions