From 42fb6c83dd624d16b55f3a31cf32113b75c65b89 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 16 Apr 2009 11:46:25 +0000 Subject: [PATCH] forward_list.h: Remove default std::allocator<_Tp> from base classes. 2009-04-16 Paolo Carlini * include/bits/forward_list.h: Remove default std::allocator<_Tp> from base classes. * testsuite/23_containers/forward_list/capacity/1.cc: Adjust. From-SVN: r146171 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/bits/c++config | 8 ++++++++ libstdc++-v3/include/bits/forward_list.h | 12 ++++++------ .../23_containers/forward_list/capacity/1.cc | 5 +++-- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 958482e02139..b794ad9958b6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2009-04-16 Paolo Carlini + + * include/bits/forward_list.h: Remove default std::allocator<_Tp> + from base classes. + * testsuite/23_containers/forward_list/capacity/1.cc: Adjust. + 2009-04-15 Benjamin Kosnik * doc/html: Regenerate. diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index dfbe48c8f1f6..46852d04b463 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -314,4 +314,12 @@ _GLIBCXX_END_NAMESPACE #undef min #undef max +#ifndef _GLIBCXX_PURE +# define _GLIBCXX_PURE __attribute__ ((__pure__)) +#endif + +#ifndef _GLIBCXX_CONST +# define _GLIBCXX_CONST __attribute__ ((__const__)) +#endif + // End of prewritten config; the discovered settings follow. diff --git a/libstdc++-v3/include/bits/forward_list.h b/libstdc++-v3/include/bits/forward_list.h index d6f42bdf722c..d49eb4a0678d 100644 --- a/libstdc++-v3/include/bits/forward_list.h +++ b/libstdc++-v3/include/bits/forward_list.h @@ -81,7 +81,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * This is just a linked list with a data value in each node. * There is a sorting utility method. */ - template > + template struct _Fwd_list_node : public _Fwd_list_node_base<_Alloc> { typedef typename _Alloc::template rebind<_Fwd_list_node<_Tp, _Alloc> > @@ -104,7 +104,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * * All the functions are op overloads. */ - template > + template struct _Fwd_list_iterator { typedef _Fwd_list_iterator<_Tp, _Alloc> _Self; @@ -171,7 +171,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) * * All the functions are op overloads. */ - template > + template struct _Fwd_list_const_iterator { typedef _Fwd_list_const_iterator<_Tp, _Alloc> _Self; @@ -240,7 +240,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Forward list iterator equality comparison. */ - template + template inline bool operator==(const _Fwd_list_iterator<_Tp, _Alloc>& __x, const _Fwd_list_const_iterator<_Tp, _Alloc>& __y) @@ -249,7 +249,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Forward list iterator inequality comparison. */ - template + template inline bool operator!=(const _Fwd_list_iterator<_Tp, _Alloc>& __x, const _Fwd_list_const_iterator<_Tp, _Alloc>& __y) @@ -258,7 +258,7 @@ _GLIBCXX_BEGIN_NAMESPACE(std) /** * @brief Base class for %forward_list. */ - template > + template struct _Fwd_list_base { protected: diff --git a/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc b/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc index 99b336bab772..973558244041 100644 --- a/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc +++ b/libstdc++-v3/testsuite/23_containers/forward_list/capacity/1.cc @@ -38,8 +38,9 @@ test01() fld.resize(0); VERIFY(fld.empty() == true); - VERIFY( fld.max_size() - == std::allocator >().max_size() ); + VERIFY( (fld.max_size() + == std::allocator > >().max_size()) ); } int -- 2.47.3