summaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorFrançois Dumont <fdumont@gcc.gnu.org>2017-05-11 20:03:47 +0000
committerFrançois Dumont <fdumont@gcc.gnu.org>2017-05-11 20:03:47 +0000
commitea594612f0478c4307b09704e902da89370a1482 (patch)
tree723e6e1ba268f3ea310f58987857f2432b18c6ba /libstdc++-v3
parentdc4dd7f63f97b6e4796aec5537ba1d238ee16920 (diff)
downloadgcc-ea594612f0478c4307b09704e902da89370a1482.tar.gz
2017-05-11 François Dumont <fdumont@gcc.gnu.org>
* include/debug/safe_container.h [_GLIBCXX_USE_CXX11_ABI] (_Safe_container<>): Remove _IsCxx11AllocatorAware template parameter. * include/debug/string: Adapt. From-SVN: r247926
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/include/debug/safe_container.h14
-rw-r--r--libstdc++-v3/include/debug/string13
3 files changed, 26 insertions, 5 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 21cdba332f8..6d626f2343f 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,9 @@
2017-05-11 François Dumont <fdumont@gcc.gnu.org>
+ * include/debug/safe_container.h [_GLIBCXX_USE_CXX11_ABI]
+ (_Safe_container<>): Remove _IsCxx11AllocatorAware template parameter.
+ * include/debug/string: Adapt.
+
* include/debug/formatter.h [_GLIBCXX_INLINE_VERSION]
(__gnu_debug::_Error_formatter::_Parameter::_M_print_field): Remove.
(__gnu_debug::_Error_formatter::_Parameter::_M_print_description):
diff --git a/libstdc++-v3/include/debug/safe_container.h b/libstdc++-v3/include/debug/safe_container.h
index 3d44c15cdf3..e985c2ae88a 100644
--- a/libstdc++-v3/include/debug/safe_container.h
+++ b/libstdc++-v3/include/debug/safe_container.h
@@ -36,8 +36,12 @@ namespace __gnu_debug
/// Safe class dealing with some allocator dependent operations.
template<typename _SafeContainer,
typename _Alloc,
- template<typename> class _SafeBase,
- bool _IsCxx11AllocatorAware = true>
+ template<typename> class _SafeBase
+#if _GLIBCXX_USE_CXX11_ABI
+ >
+#else
+ , bool _IsCxx11AllocatorAware = true>
+#endif
class _Safe_container
: public _SafeBase<_SafeContainer>
{
@@ -82,8 +86,10 @@ namespace __gnu_debug
{
__glibcxx_check_self_move_assign(__x);
+# if !_GLIBCXX_USE_CXX11_ABI
if (_IsCxx11AllocatorAware)
{
+# endif
typedef __gnu_cxx::__alloc_traits<_Alloc> _Alloc_traits;
bool __xfer_memory = _Alloc_traits::_S_propagate_on_move_assign()
@@ -92,9 +98,11 @@ namespace __gnu_debug
_Base::_M_swap(__x);
else
this->_M_invalidate_all();
+# if !_GLIBCXX_USE_CXX11_ABI
}
else
_Base::_M_swap(__x);
+# endif
__x._M_invalidate_all();
return *this;
@@ -103,7 +111,9 @@ namespace __gnu_debug
void
_M_swap(_Safe_container& __x) noexcept
{
+# if !_GLIBCXX_USE_CXX11_ABI
if (_IsCxx11AllocatorAware)
+# endif
{
typedef __gnu_cxx::__alloc_traits<_Alloc> _Alloc_traits;
diff --git a/libstdc++-v3/include/debug/string b/libstdc++-v3/include/debug/string
index 9d4057b7d43..8fd292a45a4 100644
--- a/libstdc++-v3/include/debug/string
+++ b/libstdc++-v3/include/debug/string
@@ -44,13 +44,20 @@ template<typename _CharT, typename _Traits = std::char_traits<_CharT>,
class basic_string
: public __gnu_debug::_Safe_container<
basic_string<_CharT, _Traits, _Allocator>,
- _Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>,
+#if _GLIBCXX_USE_CXX11_ABI
+ _Allocator, _Safe_sequence>,
+#else
+ _Allocator, _Safe_sequence, false>,
+#endif
public std::basic_string<_CharT, _Traits, _Allocator>
{
typedef std::basic_string<_CharT, _Traits, _Allocator> _Base;
typedef __gnu_debug::_Safe_container<
- basic_string, _Allocator, _Safe_sequence, bool(_GLIBCXX_USE_CXX11_ABI)>
- _Safe;
+#if _GLIBCXX_USE_CXX11_ABI
+ basic_string, _Allocator, _Safe_sequence> _Safe;
+#else
+ basic_string, _Allocator, _Safe_sequence, false> _Safe;
+#endif
public:
// types: