This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Revert __use_cache relocation
- From: Carlo Wood <carlo at alinoe dot com>
- To: Jerry Quinn <jlquinn at optonline dot net>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Tue, 1 Jul 2003 11:51:47 +0200
- Subject: Re: Revert __use_cache relocation
- References: <16129.7789.131957.282877@gargle.gargle.HOWL>
On Tue, Jul 01, 2003 at 01:38:53AM -0400, Jerry Quinn wrote:
> This patch http://gcc.gnu.org/ml/libstdc++/2003-06/msg00368.html is
> causing the instantiation problems I'm getting in
> http://gcc.gnu.org/ml/libstdc++/2003-07/msg00003.html
>
> Reverting this patch until we can figure out how to solve this.
>
> Index: include/bits/locale_facets.tcc
> + const __numpunct_cache<char>&
> + __use_cache(const locale& __loc);
If you put this in locale_facets.tcc and #include
it in a compilation unit, then it will instantiate
std::numpunct<char>::id no?
So, if you include it in two different compilation
units (two different *.cc file #include it), then
you get a redefinition.
You shouldn't put this in a header file.
--
Carlo Wood <carlo@alinoe.com>