From acd43917df56f8845b1497d939da97f4e22b5ebb Mon Sep 17 00:00:00 2001 From: Olivier Hainque Date: Thu, 9 Jan 2020 23:00:50 +0000 Subject: [PATCH] rename local _C2 identifiers in stl map header files 2020-01-09 Olivier Hainque * doc/xml/manual/appendix_contributing.xml: Document _C2 as a reserved identifier, by VxWorks. * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2. * include/bits/stl_multimap.h: Likewise. From-SVN: r280076 --- libstdc++-v3/ChangeLog | 7 +++++++ .../doc/xml/manual/appendix_contributing.xml | 3 +++ libstdc++-v3/include/bits/stl_map.h | 20 +++++++++---------- libstdc++-v3/include/bits/stl_multimap.h | 20 +++++++++---------- 4 files changed, 30 insertions(+), 20 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 65cd480ddcc..536eb74ba79 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2020-01-09 Olivier Hainque + + * doc/xml/manual/appendix_contributing.xml: Document _C2 + as a reserved identifier, by VxWorks. + * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2. + * include/bits/stl_multimap.h: Likewise. + 2020-01-09 Jonathan Wakely * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==) diff --git a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml index 3e10e1b5e5c..b399e71d482 100644 --- a/libstdc++-v3/doc/xml/manual/appendix_contributing.xml +++ b/libstdc++-v3/doc/xml/manual/appendix_contributing.xml @@ -463,6 +463,9 @@ indicate a place that may require attention for multi-thread safety. _res_ext __tg_* + VxWorks adds: + _C2 + For GCC: [Note that this list is out of date. It applies to the old diff --git a/libstdc++-v3/include/bits/stl_map.h b/libstdc++-v3/include/bits/stl_map.h index 4e4b82f5217..fe930c15757 100644 --- a/libstdc++-v3/include/bits/stl_map.h +++ b/libstdc++-v3/include/bits/stl_map.h @@ -637,30 +637,30 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template friend class std::_Rb_tree_merge_helper; - template + template void - merge(map<_Key, _Tp, _C2, _Alloc>& __source) + merge(map<_Key, _Tp, _Cmp2, _Alloc>& __source) { - using _Merge_helper = _Rb_tree_merge_helper; + using _Merge_helper = _Rb_tree_merge_helper; _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); } - template + template void - merge(map<_Key, _Tp, _C2, _Alloc>&& __source) + merge(map<_Key, _Tp, _Cmp2, _Alloc>&& __source) { merge(__source); } - template + template void - merge(multimap<_Key, _Tp, _C2, _Alloc>& __source) + merge(multimap<_Key, _Tp, _Cmp2, _Alloc>& __source) { - using _Merge_helper = _Rb_tree_merge_helper; + using _Merge_helper = _Rb_tree_merge_helper; _M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source)); } - template + template void - merge(multimap<_Key, _Tp, _C2, _Alloc>&& __source) + merge(multimap<_Key, _Tp, _Cmp2, _Alloc>&& __source) { merge(__source); } #endif // C++17 diff --git a/libstdc++-v3/include/bits/stl_multimap.h b/libstdc++-v3/include/bits/stl_multimap.h index 48f57788798..d38f530e123 100644 --- a/libstdc++-v3/include/bits/stl_multimap.h +++ b/libstdc++-v3/include/bits/stl_multimap.h @@ -653,30 +653,30 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER template friend class std::_Rb_tree_merge_helper; - template + template void - merge(multimap<_Key, _Tp, _C2, _Alloc>& __source) + merge(multimap<_Key, _Tp, _Cmp2, _Alloc>& __source) { - using _Merge_helper = _Rb_tree_merge_helper; + using _Merge_helper = _Rb_tree_merge_helper; _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); } - template + template void - merge(multimap<_Key, _Tp, _C2, _Alloc>&& __source) + merge(multimap<_Key, _Tp, _Cmp2, _Alloc>&& __source) { merge(__source); } - template + template void - merge(map<_Key, _Tp, _C2, _Alloc>& __source) + merge(map<_Key, _Tp, _Cmp2, _Alloc>& __source) { - using _Merge_helper = _Rb_tree_merge_helper; + using _Merge_helper = _Rb_tree_merge_helper; _M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source)); } - template + template void - merge(map<_Key, _Tp, _C2, _Alloc>&& __source) + merge(map<_Key, _Tp, _Cmp2, _Alloc>&& __source) { merge(__source); } #endif // C++17 -- 2.30.2