This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] speedup numpunct cache, take 2


On Thu, Jul 03, 2003 at 12:35:55AM -0400, Jerry Quinn wrote:
> Please look very carefully at this.  To make things compile, I had to
> disable implicit templates when compiling concept-inst.cc.  Without
> doing this, I would get duplicate symbols for numpunct<char>::id and
> numpunct<wchar_t>::id during linking.  This change does pass make

This strikes me as wrong, but I don't know what's up with the multiple ::id
instantiations.  We already have "extern template class numpunct<char>;"
in the .tcc file, so putting the functions in that file should be okay.
(I thought.)

I /do/ know that this will largely defeat the purpose of
concept-inst.cc.  Some brief discussion about why it is the way it is:
http://gcc.gnu.org/ml/libstdc++/2001-09/msg00026.html.  This will cause
problems, especially if we want concept checking on by default in 3.4
(mentioned as a possibility at the summit).

(Long-term, I'd like to remove the concept checks and replace them with
the reflection utilities.  Don't anybody hold your breath.)

Are folks willing to help us investigate this ::id problem some more?


(One note:)

> Index: src/locale-inst.cc
> ===================================================================
> RCS file: /cvs/gcc/gcc/libstdc++-v3/src/locale-inst.cc,v
> retrieving revision 1.39
> diff -u -r1.39 locale-inst.cc
> --- src/locale-inst.cc	27 Jun 2003 07:25:37 -0000	1.39
> +++ src/locale-inst.cc	3 Jul 2003 04:28:32 -0000
> @@ -56,7 +56,7 @@
>  #endif
>  
>    // numpunct, numpunct_byname, num_get, and num_put
> -  template class numpunct<char>;
> +   template class numpunct<char>;
>    template struct __numpunct_cache<char>;
>    template class numpunct_byname<char>;
>    template class num_get<char, istreambuf_iterator<char> >;

Uh?

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]