This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[v3] Minor tweaks to ext/vstring
- 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: Mon, 02 Oct 2006 18:12:27 +0200
- Subject: [v3] Minor tweaks to ext/vstring
Hi,
tested x86-linux, committed to mainline.
Paolo.
////////////////
2006-10-02 Paolo Carlini <pcarlini@suse.de>
* include/ext/rc_string_base.h (_M_compare<wchar_t>):
Protect with _GLIBCXX_USE_WCHAR_T.
* include/ext/sso_string_base.h (_M_compare<wchar_t>):
Likewise.
(__sso_string_base<>::_M_destroy): Inline.
Index: include/ext/rc_string_base.h
===================================================================
--- include/ext/rc_string_base.h (revision 117371)
+++ include/ext/rc_string_base.h (working copy)
@@ -699,6 +699,7 @@
return false;
}
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
inline bool
__rc_string_base<wchar_t, std::char_traits<wchar_t>,
@@ -709,6 +710,7 @@
return true;
return false;
}
+#endif
_GLIBCXX_END_NAMESPACE
Index: include/ext/sso_string_base.h
===================================================================
--- include/ext/sso_string_base.h (revision 117371)
+++ include/ext/sso_string_base.h (working copy)
@@ -92,7 +92,8 @@
}
void
- _M_destroy(size_type) throw();
+ _M_destroy(size_type __size) throw()
+ { _M_get_allocator().deallocate(_M_data(), __size + 1); }
// _M_construct_aux is used to implement the 21.3.1 para 15 which
// requires special behaviour if _InIterator is an integral type
@@ -224,12 +225,6 @@
template<typename _CharT, typename _Traits, typename _Alloc>
void
__sso_string_base<_CharT, _Traits, _Alloc>::
- _M_destroy(size_type __size) throw()
- { _M_get_allocator().deallocate(_M_data(), __size + 1); }
-
- template<typename _CharT, typename _Traits, typename _Alloc>
- void
- __sso_string_base<_CharT, _Traits, _Alloc>::
_M_swap(__sso_string_base& __rcs)
{
// _GLIBCXX_RESOLVE_LIB_DEFECTS
@@ -554,6 +549,7 @@
return false;
}
+#ifdef _GLIBCXX_USE_WCHAR_T
template<>
inline bool
__sso_string_base<wchar_t, std::char_traits<wchar_t>,
@@ -564,6 +560,7 @@
return true;
return false;
}
+#endif
_GLIBCXX_END_NAMESPACE