[gcc/devel/gccgo] rename local _C2 identifiers in stl map header files
Ian Lance Taylor
ian@gcc.gnu.org
Thu Jan 23 00:10:00 GMT 2020
https://gcc.gnu.org/g:acd43917df56f8845b1497d939da97f4e22b5ebb
commit acd43917df56f8845b1497d939da97f4e22b5ebb
Author: Olivier Hainque <hainque@adacore.com>
Date: Thu Jan 9 23:00:50 2020 +0000
rename local _C2 identifiers in stl map header files
2020-01-09 Olivier Hainque <hainque@adacore.com>
* 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
Diff:
---
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 65cd480..536eb74 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,10 @@
+2020-01-09 Olivier Hainque <hainque@adacore.com>
+
+ * 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 <jwakely@redhat.com>
* 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 3e10e1b..b399e71 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 4e4b82f..fe930c1 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<typename, typename>
friend class std::_Rb_tree_merge_helper;
- template<typename _C2>
+ template<typename _Cmp2>
void
- merge(map<_Key, _Tp, _C2, _Alloc>& __source)
+ merge(map<_Key, _Tp, _Cmp2, _Alloc>& __source)
{
- using _Merge_helper = _Rb_tree_merge_helper<map, _C2>;
+ using _Merge_helper = _Rb_tree_merge_helper<map, _Cmp2>;
_M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source));
}
- template<typename _C2>
+ template<typename _Cmp2>
void
- merge(map<_Key, _Tp, _C2, _Alloc>&& __source)
+ merge(map<_Key, _Tp, _Cmp2, _Alloc>&& __source)
{ merge(__source); }
- template<typename _C2>
+ template<typename _Cmp2>
void
- merge(multimap<_Key, _Tp, _C2, _Alloc>& __source)
+ merge(multimap<_Key, _Tp, _Cmp2, _Alloc>& __source)
{
- using _Merge_helper = _Rb_tree_merge_helper<map, _C2>;
+ using _Merge_helper = _Rb_tree_merge_helper<map, _Cmp2>;
_M_t._M_merge_unique(_Merge_helper::_S_get_tree(__source));
}
- template<typename _C2>
+ template<typename _Cmp2>
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 48f5778..d38f530 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<typename, typename>
friend class std::_Rb_tree_merge_helper;
- template<typename _C2>
+ template<typename _Cmp2>
void
- merge(multimap<_Key, _Tp, _C2, _Alloc>& __source)
+ merge(multimap<_Key, _Tp, _Cmp2, _Alloc>& __source)
{
- using _Merge_helper = _Rb_tree_merge_helper<multimap, _C2>;
+ using _Merge_helper = _Rb_tree_merge_helper<multimap, _Cmp2>;
_M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source));
}
- template<typename _C2>
+ template<typename _Cmp2>
void
- merge(multimap<_Key, _Tp, _C2, _Alloc>&& __source)
+ merge(multimap<_Key, _Tp, _Cmp2, _Alloc>&& __source)
{ merge(__source); }
- template<typename _C2>
+ template<typename _Cmp2>
void
- merge(map<_Key, _Tp, _C2, _Alloc>& __source)
+ merge(map<_Key, _Tp, _Cmp2, _Alloc>& __source)
{
- using _Merge_helper = _Rb_tree_merge_helper<multimap, _C2>;
+ using _Merge_helper = _Rb_tree_merge_helper<multimap, _Cmp2>;
_M_t._M_merge_equal(_Merge_helper::_S_get_tree(__source));
}
- template<typename _C2>
+ template<typename _Cmp2>
void
- merge(map<_Key, _Tp, _C2, _Alloc>&& __source)
+ merge(map<_Key, _Tp, _Cmp2, _Alloc>&& __source)
{ merge(__source); }
#endif // C++17
More information about the Libstdc++-cvs
mailing list