diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2016-04-13 22:00:50 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2016-04-13 22:00:50 +0000 |
commit | 888832c903b1ac27afbbb5cfb44fbd67a4819ef3 (patch) | |
tree | fd0e08b795e1472a7808be3be87fd65081269452 /libstdc++-v3/include/bits/c++config | |
parent | e563e80687f2b090418c8668a6abf1ad7e77c91b (diff) |
Adjust for new empty class parameter passing ABI.
* include/bits/c++config (_GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES,
_GLIBCXX_END_NAMESPACE_EMPTY_TYPES, _GLIBCXX_ABI_TAG_EMPTY): Define.
* include/bits/hashtable.h (_Hashtable::_M_emplace): Change signatures
of functions taking empty structs by value. Add a template parameter
to overloads without hints. Rename overloads with hints to
_M_emplace_hint.
(_Hashtable::_M_erase(true_type, const_iterator),
_Hashtable::_M_erase(false_type, const_iterator)): Change signatures
by reordering parameters.
* include/bits/hashtable_policy.h (_Insert::insert): Adjust to call
_M_emplace_hint instead of _M_emplace.
* include/bits/shared_ptr.h (shared_ptr(_Tp1*, _Deleter, _Alloc),
shared_ptr(nullptr_t, _Deleter, _Alloc)): Use _GLIBCXX_ABI_TAG_EMPTY.
* include/bits/shared_ptr_base.h (_Sp_counted_deleter, __shared_count,
__shared_ptr): Likewise.
* include/bits/stl_algo.h (replace_if): Likewise.
* include/bits/stl_pair.h (piecewise_construct_t,
piecewise_construct): Use _GLIBCXX_BEGIN_NAMESPACE_EMPTY_TYPES.
* include/bits/uses_allocator.h (allocator_arg_t, allocator_arg,
__uses_alloc0): Likewise.
* include/ext/pb_ds/assoc_container.hpp (basic_hash_table): Likewise.
* testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
* testsuite/ext/profile/mutex_extensions_neg.cc: Likewise.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@234964 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/c++config')
-rw-r--r-- | libstdc++-v3/include/bits/c++config | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index 57024e40ec0..bde003c68a0 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -84,13 +84,32 @@ # 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 __cplusplus +#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 // Macro for constexpr, to support in mixed 03/0x mode. #ifndef _GLIBCXX_CONSTEXPR |