summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-14 16:23:06 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2016-04-14 16:23:06 +0000
commitb72904f58e5c9f7701f96110b238d357c7c0ad37 (patch)
tree0d922603fa3db1c9a198d7caeec6b41056443321 /libstdc++-v3/include/bits
parent3e74b0254e9067dfd66c38fbb2ceaa584463f3da (diff)
downloadgcc-b72904f58e5c9f7701f96110b238d357c7c0ad37.tar.gz
Revert empty class parameter passing ABI changes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234977 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits')
-rw-r--r--libstdc++-v3/include/bits/c++config23
-rw-r--r--libstdc++-v3/include/bits/hashtable.h42
-rw-r--r--libstdc++-v3/include/bits/hashtable_policy.h4
-rw-r--r--libstdc++-v3/include/bits/shared_ptr.h2
-rw-r--r--libstdc++-v3/include/bits/shared_ptr_base.h6
-rw-r--r--libstdc++-v3/include/bits/stl_algo.h1
-rw-r--r--libstdc++-v3/include/bits/stl_pair.h5
-rw-r--r--libstdc++-v3/include/bits/uses_allocator.h8
8 files changed, 24 insertions, 67 deletions
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config
index bde003c68a0..57024e40ec0 100644
--- a/libstdc++-v3/include/bits/c++config
+++ b/libstdc++-v3/include/bits/c++config
@@ -84,32 +84,13 @@
# define _GLIBCXX_DEPRECATED
#endif
-#if __cplusplus
-
// Macros for ABI tag attributes.
#ifndef _GLIBCXX_ABI_TAG_CXX11
# define _GLIBCXX_ABI_TAG_CXX11 __attribute ((__abi_tag__ ("cxx11")))
#endif
-#if __GXX_ABI_VERSION >= 1010
-namespace std
-{
- inline namespace _V2 { }
-}
-# define _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES \
- _GLIBCXX_END_NAMESPACE_VERSION \
- namespace _V2 { \
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-# define _GLIBCXX_END_NAMESPACE_EMPTY_TYPES \
- _GLIBCXX_END_NAMESPACE_VERSION \
- } \
- _GLIBCXX_BEGIN_NAMESPACE_VERSION
-# define _GLIBCXX_ABI_TAG_EMPTY __attribute ((__abi_tag__ ("cxxempty")))
-#else
-# define _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES
-# define _GLIBCXX_END_NAMESPACE_EMPTY_TYPES
-# define _GLIBCXX_ABI_TAG_EMPTY
-#endif
+
+#if __cplusplus
// Macro for constexpr, to support in mixed 03/0x mode.
#ifndef _GLIBCXX_CONSTEXPR
diff --git a/libstdc++-v3/include/bits/hashtable.h b/libstdc++-v3/include/bits/hashtable.h
index 22b71876129..5748920cc78 100644
--- a/libstdc++-v3/include/bits/hashtable.h
+++ b/libstdc++-v3/include/bits/hashtable.h
@@ -663,26 +663,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_M_insert_multi_node(__node_type* __hint,
__hash_code __code, __node_type* __n);
- template<bool _Uniq, typename... _Args>
- typename enable_if<_Uniq, std::pair<iterator, bool>>::type
- _M_emplace(__bool_constant<_Uniq>, _Args&&... __args);
+ template<typename... _Args>
+ std::pair<iterator, bool>
+ _M_emplace(std::true_type, _Args&&... __args);
- template<bool _Uniq, typename... _Args>
- typename enable_if<!_Uniq, iterator>::type
- _M_emplace(__bool_constant<_Uniq> __uk, _Args&&... __args)
- {
- return _M_emplace_hint(cend(), __uk, std::forward<_Args>(__args)...);
- }
+ template<typename... _Args>
+ iterator
+ _M_emplace(std::false_type __uk, _Args&&... __args)
+ { return _M_emplace(cend(), __uk, std::forward<_Args>(__args)...); }
// Emplace with hint, useless when keys are unique.
template<typename... _Args>
iterator
- _M_emplace_hint(const_iterator, std::true_type __uk, _Args&&... __args)
+ _M_emplace(const_iterator, std::true_type __uk, _Args&&... __args)
{ return _M_emplace(__uk, std::forward<_Args>(__args)...).first; }
template<typename... _Args>
iterator
- _M_emplace_hint(const_iterator, std::false_type, _Args&&... __args);
+ _M_emplace(const_iterator, std::false_type, _Args&&... __args);
template<typename _Arg, typename _NodeGenerator>
std::pair<iterator, bool>
@@ -714,10 +712,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
const _NodeGenerator&, std::false_type);
size_type
- _M_erase(const key_type&, std::true_type);
+ _M_erase(std::true_type, const key_type&);
size_type
- _M_erase(const key_type&, std::false_type);
+ _M_erase(std::false_type, const key_type&);
iterator
_M_erase(size_type __bkt, __node_base* __prev_n, __node_type* __n);
@@ -733,8 +731,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
iterator
emplace_hint(const_iterator __hint, _Args&&... __args)
{
- return _M_emplace_hint(__hint, __unique_keys(),
- std::forward<_Args>(__args)...);
+ return _M_emplace(__hint, __unique_keys(),
+ std::forward<_Args>(__args)...);
}
// Insert member functions via inheritance.
@@ -750,7 +748,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
size_type
erase(const key_type& __k)
- { return _M_erase(__k, __unique_keys()); }
+ { return _M_erase(__unique_keys(), __k); }
iterator
erase(const_iterator, const_iterator);
@@ -1504,12 +1502,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typename _Alloc, typename _ExtractKey, typename _Equal,
typename _H1, typename _H2, typename _Hash, typename _RehashPolicy,
typename _Traits>
- template<bool _Uniq, typename... _Args>
+ template<typename... _Args>
auto
_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, _Traits>::
- _M_emplace(__bool_constant<_Uniq>, _Args&&... __args)
- -> typename enable_if<_Uniq, pair<iterator, bool>>::type
+ _M_emplace(std::true_type, _Args&&... __args)
+ -> pair<iterator, bool>
{
// First build the node to get access to the hash code
__node_type* __node = this->_M_allocate_node(std::forward<_Args>(__args)...);
@@ -1546,7 +1544,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
auto
_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, _Traits>::
- _M_emplace_hint(const_iterator __hint, std::false_type, _Args&&... __args)
+ _M_emplace(const_iterator __hint, std::false_type, _Args&&... __args)
-> iterator
{
// First build the node to get its hash code.
@@ -1771,7 +1769,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
auto
_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, _Traits>::
- _M_erase(const key_type& __k, std::true_type)
+ _M_erase(std::true_type, const key_type& __k)
-> size_type
{
__hash_code __code = this->_M_hash_code(__k);
@@ -1795,7 +1793,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
auto
_Hashtable<_Key, _Value, _Alloc, _ExtractKey, _Equal,
_H1, _H2, _Hash, _RehashPolicy, _Traits>::
- _M_erase(const key_type& __k, std::false_type)
+ _M_erase(std::false_type, const key_type& __k)
-> size_type
{
__hash_code __code = this->_M_hash_code(__k);
diff --git a/libstdc++-v3/include/bits/hashtable_policy.h b/libstdc++-v3/include/bits/hashtable_policy.h
index ceb78b4d709..7a2ac92f839 100644
--- a/libstdc++-v3/include/bits/hashtable_policy.h
+++ b/libstdc++-v3/include/bits/hashtable_policy.h
@@ -906,8 +906,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
insert(const_iterator __hint, _Pair&& __v)
{
__hashtable& __h = this->_M_conjure_hashtable();
- return __h._M_emplace_hint(__hint, __unique_keys(),
- std::forward<_Pair>(__v));
+ return __h._M_emplace(__hint, __unique_keys(),
+ std::forward<_Pair>(__v));
}
};
diff --git a/libstdc++-v3/include/bits/shared_ptr.h b/libstdc++-v3/include/bits/shared_ptr.h
index f4c27543c7b..b22477e96b2 100644
--- a/libstdc++-v3/include/bits/shared_ptr.h
+++ b/libstdc++-v3/include/bits/shared_ptr.h
@@ -166,7 +166,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* __shared_ptr will release __p by calling __d(__p)
*/
template<typename _Tp1, typename _Deleter, typename _Alloc>
- _GLIBCXX_ABI_TAG_EMPTY
shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a)
: __shared_ptr<_Tp>(__p, __d, std::move(__a)) { }
@@ -186,7 +185,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* The last owner will call __d(__p)
*/
template<typename _Deleter, typename _Alloc>
- _GLIBCXX_ABI_TAG_EMPTY
shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
: __shared_ptr<_Tp>(__p, __d, std::move(__a)) { }
diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index 6d523e17986..e844c9c91fe 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
@@ -436,7 +436,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
typedef _Sp_ebo_helper<1, _Alloc> _Alloc_base;
public:
- _GLIBCXX_ABI_TAG_EMPTY
_Impl(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
: _M_ptr(__p), _Del_base(__d), _Alloc_base(__a)
{ }
@@ -455,7 +454,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: _M_impl(__p, __d, _Alloc()) { }
// __d(__p) must not throw.
- _GLIBCXX_ABI_TAG_EMPTY
_Sp_counted_deleter(_Ptr __p, _Deleter __d, const _Alloc& __a) noexcept
: _M_impl(__p, __d, __a) { }
@@ -586,7 +584,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ }
template<typename _Ptr, typename _Deleter, typename _Alloc>
- _GLIBCXX_ABI_TAG_EMPTY
__shared_count(_Ptr __p, _Deleter __d, _Alloc __a) : _M_pi(0)
{
typedef _Sp_counted_deleter<_Ptr, _Deleter, _Alloc, _Lp> _Sp_cd_type;
@@ -903,7 +900,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
template<typename _Tp1, typename _Deleter, typename _Alloc>
- _GLIBCXX_ABI_TAG_EMPTY
__shared_ptr(_Tp1* __p, _Deleter __d, _Alloc __a)
: _M_ptr(__p), _M_refcount(__p, __d, std::move(__a))
{
@@ -918,7 +914,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ }
template<typename _Deleter, typename _Alloc>
- _GLIBCXX_ABI_TAG_EMPTY
__shared_ptr(nullptr_t __p, _Deleter __d, _Alloc __a)
: _M_ptr(0), _M_refcount(__p, __d, std::move(__a))
{ }
@@ -1044,7 +1039,6 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ __shared_ptr(__p, __d).swap(*this); }
template<typename _Tp1, typename _Deleter, typename _Alloc>
- _GLIBCXX_ABI_TAG_EMPTY
void
reset(_Tp1* __p, _Deleter __d, _Alloc __a)
{ __shared_ptr(__p, __d, std::move(__a)).swap(*this); }
diff --git a/libstdc++-v3/include/bits/stl_algo.h b/libstdc++-v3/include/bits/stl_algo.h
index 28e1e3b2331..fbd03a79e1e 100644
--- a/libstdc++-v3/include/bits/stl_algo.h
+++ b/libstdc++-v3/include/bits/stl_algo.h
@@ -4270,7 +4270,6 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
* is true then the assignment @c *i = @p __new_value is performed.
*/
template<typename _ForwardIterator, typename _Predicate, typename _Tp>
- _GLIBCXX_ABI_TAG_EMPTY
void
replace_if(_ForwardIterator __first, _ForwardIterator __last,
_Predicate __pred, const _Tp& __new_value)
diff --git a/libstdc++-v3/include/bits/stl_pair.h b/libstdc++-v3/include/bits/stl_pair.h
index e6ff00eec17..37ee5cc4053 100644
--- a/libstdc++-v3/include/bits/stl_pair.h
+++ b/libstdc++-v3/include/bits/stl_pair.h
@@ -72,17 +72,12 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
#if __cplusplus >= 201103L
-
-_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES
-
/// piecewise_construct_t
struct piecewise_construct_t { explicit piecewise_construct_t() = default; };
/// piecewise_construct
constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
-_GLIBCXX_END_NAMESPACE_EMPTY_TYPES
-
// Forward declarations.
template<typename...>
class tuple;
diff --git a/libstdc++-v3/include/bits/uses_allocator.h b/libstdc++-v3/include/bits/uses_allocator.h
index 86162a8af8a..b1ff58a294b 100644
--- a/libstdc++-v3/include/bits/uses_allocator.h
+++ b/libstdc++-v3/include/bits/uses_allocator.h
@@ -42,15 +42,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
using __is_erased_or_convertible
= __or_<is_same<_Tp, __erased_type>, is_convertible<_Alloc, _Tp>>;
-_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES
-
/// [allocator.tag]
struct allocator_arg_t { explicit allocator_arg_t() = default; };
constexpr allocator_arg_t allocator_arg = allocator_arg_t();
-_GLIBCXX_END_NAMESPACE_EMPTY_TYPES
-
template<typename _Tp, typename _Alloc, typename = __void_t<>>
struct __uses_allocator_helper
: false_type { };
@@ -69,15 +65,11 @@ _GLIBCXX_END_NAMESPACE_EMPTY_TYPES
struct __uses_alloc_base { };
-_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES
-
struct __uses_alloc0 : __uses_alloc_base
{
struct _Sink { void operator=(const void*) { } } _M_a;
};
-_GLIBCXX_END_NAMESPACE_EMPTY_TYPES
-
template<typename _Alloc>
struct __uses_alloc1 : __uses_alloc_base { const _Alloc* _M_a; };