summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-01 15:00:46 +0000
committeremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-01 15:00:46 +0000
commitcb58054fc7ce3c92437404e74102a0cc21d2fff5 (patch)
tree6505974ebb76e7e3cb20bdc49e0f1b09ec4e8b28
parentabef0e58d36bb9ec484a965aab603c431381ef28 (diff)
downloadgcc-cb58054fc7ce3c92437404e74102a0cc21d2fff5.tar.gz
2015-05-01 Edward Smith-Rowland <3dw4rd@verizon.net>
Inline one-line erasure dispatch functions. * include/experimental/forward_list (erase_if(), erase()): Inline. * include/experimental/list (erase_if(), erase()): Inline. * include/experimental/map (erase_if(*)): Inline. * include/experimental/set (erase_if(*)): Inline. * include/experimental/string (erase_if(), erase()): Inline. * include/experimental/unordered_map (erase_if(*)): Inline. * include/experimental/unordered_set (erase_if(*)): Inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@222684 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog11
-rw-r--r--libstdc++-v3/include/experimental/forward_list5
-rw-r--r--libstdc++-v3/include/experimental/list4
-rw-r--r--libstdc++-v3/include/experimental/map4
-rw-r--r--libstdc++-v3/include/experimental/set4
-rw-r--r--libstdc++-v3/include/experimental/string4
-rw-r--r--libstdc++-v3/include/experimental/unordered_map4
-rw-r--r--libstdc++-v3/include/experimental/unordered_set4
-rw-r--r--libstdc++-v3/include/experimental/vector4
9 files changed, 28 insertions, 16 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 012e3fec31c..200e091c786 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,14 @@
+2015-05-01 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ Inline one-line erasure dispatch functions.
+ * include/experimental/forward_list (erase_if(), erase()): Inline.
+ * include/experimental/list (erase_if(), erase()): Inline.
+ * include/experimental/map (erase_if(*)): Inline.
+ * include/experimental/set (erase_if(*)): Inline.
+ * include/experimental/string (erase_if(), erase()): Inline.
+ * include/experimental/unordered_map (erase_if(*)): Inline.
+ * include/experimental/unordered_set (erase_if(*)): Inline.
+
2015-05-01 Jonathan Wakely <jwakely@redhat.com>
* doc/xml/manual/intro.xml: Link to new status_cxx2017.xml file.
diff --git a/libstdc++-v3/include/experimental/forward_list b/libstdc++-v3/include/experimental/forward_list
index 482ac126c8b..e7e6b33bd00 100644
--- a/libstdc++-v3/include/experimental/forward_list
+++ b/libstdc++-v3/include/experimental/forward_list
@@ -46,12 +46,13 @@ inline namespace fundamentals_v2
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, typename _Alloc, typename _Predicate>
- void
+ inline void
erase_if(forward_list<_Tp, _Alloc>& __cont, _Predicate __pred)
{ __cont.remove_if(__pred); }
template<typename _Tp, typename _Alloc, typename _Up>
- void erase(forward_list<_Tp, _Alloc>& __cont, const _Up& __value)
+ inline void
+ erase(forward_list<_Tp, _Alloc>& __cont, const _Up& __value)
{
using __elem_type = typename forward_list<_Tp, _Alloc>::value_type;
erase_if(__cont, [&](__elem_type& __elem) { return __elem == __value; });
diff --git a/libstdc++-v3/include/experimental/list b/libstdc++-v3/include/experimental/list
index 9bdf8d5ed16..41d6e1dcbdc 100644
--- a/libstdc++-v3/include/experimental/list
+++ b/libstdc++-v3/include/experimental/list
@@ -46,12 +46,12 @@ inline namespace fundamentals_v2
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, typename _Alloc, typename _Predicate>
- void
+ inline void
erase_if(list<_Tp, _Alloc>& __cont, _Predicate __pred)
{ __cont.remove_if(__pred); }
template<typename _Tp, typename _Alloc, typename _Up>
- void
+ inline void
erase(list<_Tp, _Alloc>& __cont, const _Up& __value)
{
using __elem_type = typename list<_Tp, _Alloc>::value_type;
diff --git a/libstdc++-v3/include/experimental/map b/libstdc++-v3/include/experimental/map
index c2b5a09e873..e4b3620e671 100644
--- a/libstdc++-v3/include/experimental/map
+++ b/libstdc++-v3/include/experimental/map
@@ -48,13 +48,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Key, typename _Tp, typename _Compare, typename _Alloc,
typename _Predicate>
- void
+ inline void
erase_if(map<_Key, _Tp, _Compare, _Alloc>& __cont, _Predicate __pred)
{ __detail::__erase_nodes_if(__cont, __pred); }
template<typename _Key, typename _Tp, typename _Compare, typename _Alloc,
typename _Predicate>
- void
+ inline void
erase_if(multimap<_Key, _Tp, _Compare, _Alloc>& __cont, _Predicate __pred)
{ __detail::__erase_nodes_if(__cont, __pred); }
diff --git a/libstdc++-v3/include/experimental/set b/libstdc++-v3/include/experimental/set
index 7b87848fca9..c742d9187f5 100644
--- a/libstdc++-v3/include/experimental/set
+++ b/libstdc++-v3/include/experimental/set
@@ -48,13 +48,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Key, typename _Compare, typename _Alloc,
typename _Predicate>
- void
+ inline void
erase_if(set<_Key, _Compare, _Alloc>& __cont, _Predicate __pred)
{ __detail::__erase_nodes_if(__cont, __pred); }
template<typename _Key, typename _Compare, typename _Alloc,
typename _Predicate>
- void
+ inline void
erase_if(multiset<_Key, _Compare, _Alloc>& __cont, _Predicate __pred)
{ __detail::__erase_nodes_if(__cont, __pred); }
diff --git a/libstdc++-v3/include/experimental/string b/libstdc++-v3/include/experimental/string
index 70212fbd8b0..2a04ce0d72d 100644
--- a/libstdc++-v3/include/experimental/string
+++ b/libstdc++-v3/include/experimental/string
@@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _CharT, typename _Traits, typename _Alloc,
typename _Predicate>
- void
+ inline void
erase_if(basic_string<_CharT, _Traits, _Alloc>& __cont, _Predicate __pred)
{
__cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred),
@@ -56,7 +56,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
template<typename _CharT, typename _Traits, typename _Alloc, typename _Up>
- void
+ inline void
erase(basic_string<_CharT, _Traits, _Alloc>& __cont, const _Up& __value)
{
__cont.erase(std::remove(__cont.begin(), __cont.end(), __value),
diff --git a/libstdc++-v3/include/experimental/unordered_map b/libstdc++-v3/include/experimental/unordered_map
index 438f886d6c8..d3a578efe3a 100644
--- a/libstdc++-v3/include/experimental/unordered_map
+++ b/libstdc++-v3/include/experimental/unordered_map
@@ -48,14 +48,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Key, typename _Tp, typename _Hash, typename _CPred,
typename _Alloc, typename _Predicate>
- void
+ inline void
erase_if(unordered_map<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont,
_Predicate __pred)
{ __detail::__erase_nodes_if(__cont, __pred); }
template<typename _Key, typename _Tp, typename _Hash, typename _CPred,
typename _Alloc, typename _Predicate>
- void
+ inline void
erase_if(unordered_multimap<_Key, _Tp, _Hash, _CPred, _Alloc>& __cont,
_Predicate __pred)
{ __detail::__erase_nodes_if(__cont, __pred); }
diff --git a/libstdc++-v3/include/experimental/unordered_set b/libstdc++-v3/include/experimental/unordered_set
index 44610475e55..2e5e08a9609 100644
--- a/libstdc++-v3/include/experimental/unordered_set
+++ b/libstdc++-v3/include/experimental/unordered_set
@@ -48,14 +48,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Key, typename _Hash, typename _CPred, typename _Alloc,
typename _Predicate>
- void
+ inline void
erase_if(unordered_set<_Key, _Hash, _CPred, _Alloc>& __cont,
_Predicate __pred)
{ __detail::__erase_nodes_if(__cont, __pred); }
template<typename _Key, typename _Hash, typename _CPred, typename _Alloc,
typename _Predicate>
- void
+ inline void
erase_if(unordered_multiset<_Key, _Hash, _CPred, _Alloc>& __cont,
_Predicate __pred)
{ __detail::__erase_nodes_if(__cont, __pred); }
diff --git a/libstdc++-v3/include/experimental/vector b/libstdc++-v3/include/experimental/vector
index 2d4c1f75cdb..245e0340fd8 100644
--- a/libstdc++-v3/include/experimental/vector
+++ b/libstdc++-v3/include/experimental/vector
@@ -47,7 +47,7 @@ inline namespace fundamentals_v2
_GLIBCXX_BEGIN_NAMESPACE_VERSION
template<typename _Tp, typename _Alloc, typename _Predicate>
- void
+ inline void
erase_if(vector<_Tp, _Alloc>& __cont, _Predicate __pred)
{
__cont.erase(std::remove_if(__cont.begin(), __cont.end(), __pred),
@@ -55,7 +55,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
template<typename _Tp, typename _Alloc, typename _Up>
- void
+ inline void
erase(vector<_Tp, _Alloc>& __cont, const _Up& __value)
{
__cont.erase(std::remove(__cont.begin(), __cont.end(), __value),