This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/4539 locale::combine should be const
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: libstdc++/4539 locale::combine should be const
- From: Craig Rodrigues <rodrigc at mediaone dot net>
- Date: Sun, 14 Oct 2001 14:47:12 -0400
- Cc: libstdc++ at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, brendan at zen dot org, rodrigc at gcc dot gnu dot org
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=4539&database=gcc
Hi,
Please apply the following patch to mainline, which
addresses PR 4539.
"Library DR #14 includes the change that locale::combine should be
const; the attached patch includes that change in both localefwd.h
and locale_facets.tcc."
2001-10-10 Brendan Kehoe <brendan@zen.org>
* bits/localefwd.h (locale::combine): Add const for lib DR 14.
* bits/locale_facets.tcc (locale::combine): Likewise.
Index: include/bits/locale_facets.tcc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/locale_facets.tcc,v
retrieving revision 1.29
diff -u -p -r1.29 locale_facets.tcc
--- locale_facets.tcc 2001/10/02 18:44:39 1.29
+++ locale_facets.tcc 2001/10/10 11:44:22
@@ -46,7 +46,7 @@ namespace std
{
template<typename _Facet>
locale
- locale::combine(const locale& __other)
+ locale::combine(const locale& __other) const
{
_Impl* __tmp = new _Impl(*_M_impl, 1);
__tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
Index: include/bits/localefwd.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/localefwd.h,v
retrieving revision 1.19
diff -u -p -r1.19 localefwd.h
--- localefwd.h 2001/09/20 08:30:00 1.19
+++ localefwd.h 2001/10/10 11:44:23
@@ -234,7 +234,7 @@ namespace std
template<typename _Facet>
locale
- combine(const locale& __other);
+ combine(const locale& __other) const;
// Locale operations:
string
--
Craig Rodrigues
http://www.gis.net/~craigr
rodrigc@mediaone.net