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 a bit


Nathan Myers writes:
 > On Sat, Jun 28, 2003 at 12:17:18AM -0400, Jerry Quinn wrote:
 > > Nathan Myers writes:
 > >  > On Fri, Jun 27, 2003 at 10:38:02PM -0400, Jerry Quinn wrote:
 > >  > > This moves the code for __use_cache<numpunct> to locale_facets.tcc.
 > >  > 
 > >  > Making it inline is a wondrous thing, but all inlines must go in 
 > >  > ".h" files.  Everything in a .tcc file is supposed to be able to 
 > >  > be declared "export" and not need to be seen at instantiation time, 
 > >  > meaning (mainly) no public class declarations and no inlines.
 > > 
 > In practice, the template definitions (more or less in source form)
 > get put in the object library (along with the header definitions 
 > they depend on) and the templates get instantiated and compiled at 
 > what we are used to thinking of as link time.  The purpose is to 
 > minimize the amount of stuff that has to be #included, and to allow 
 > changes to the .tcc files, and the library they appear in, without 
 > recompiling .o files that don't need to know about implementations.
 > 
 > > __use_cache is only being used within the .tcc file.  Does it still
 > > have to be in the .h?  Why doesn't this apply to std::use_facet and
 > > std::has_facet - or should it?
 > 
 > My mistake.  If it's used only in the .tcc file, then it only need
 > be declared/defined there, inline or no.  use_facet<> and has_facet<> 
 > should not be in the .tcc file.  If they are (I haven't looked), 
 > that's something to fix.

Umm, so is this approved?

Jerry


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