This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3, v7-branch] Minor tweak to sso_string
- From: Paolo Carlini <pcarlini at suse dot de>
- To: "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 01 Jul 2005 19:56:39 +0200
- Subject: [v3, v7-branch] Minor tweak to sso_string
Hi,
tested x86-linux, committed to the branch.
Paolo.
////////////////
2005-07-01 Paolo Carlini <pcarlini@suse.de>
* include/ext/sso_string.h (struct __sso_string_base):
Add _Traits template parameter; tweak typedefs.
(class __sso_string): Adjust consistently.
Index: sso_string.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/ext/Attic/sso_string.h,v
retrieving revision 1.1.2.5
diff -u -r1.1.2.5 sso_string.h
--- sso_string.h 16 Jun 2005 19:30:47 -0000 1.1.2.5
+++ sso_string.h 1 Jul 2005 16:55:38 -0000
@@ -41,12 +41,12 @@
// N.B. According to 3.9/10 and 9/4, POD types can have user-defined
// constructors: in that case, cannot be member of an union (9.5/1).
// See, f.i., class gnu_char_type in the testsuite.
- template<typename _CharT, typename _Alloc,
+ template<typename _CharT, typename _Traits, typename _Alloc,
bool = std::__is_scalar<_CharT>::__value>
struct __sso_string_base
{
- typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
- typedef typename _CharT_alloc_type::size_type size_type;
+ typedef typename __string_utility<_CharT, _Traits, _Alloc>::
+ _CharT_alloc_type::size_type size_type;
enum { _S_local_capacity = 15 };
@@ -57,11 +57,11 @@
};
};
- template<typename _CharT, typename _Alloc>
- struct __sso_string_base<_CharT, _Alloc, false>
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ struct __sso_string_base<_CharT, _Traits, _Alloc, false>
{
- typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
- typedef typename _CharT_alloc_type::size_type size_type;
+ typedef typename __string_utility<_CharT, _Traits, _Alloc>::
+ _CharT_alloc_type::size_type size_type;
enum { _S_local_capacity = 15 };
@@ -72,9 +72,9 @@
template<typename _CharT, typename _Traits, typename _Alloc>
class __sso_string
: protected __string_utility<_CharT, _Traits, _Alloc>,
- private __sso_string_base<_CharT, _Alloc>
+ private __sso_string_base<_CharT, _Traits, _Alloc>
{
- typedef __sso_string_base<_CharT, _Alloc> _Base;
+ typedef __sso_string_base<_CharT, _Traits, _Alloc> _Base;
public:
typedef _Traits traits_type;