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: lazy facet instantiation


Howard Hinnant wrote:

> Sure.
>
> All of the facets are templated.  Our current locale default 
> constructor (somewhere deep down under) does something like:
>
> install(new ctype<char>);
> install(new ctype<wchar_t>);
> install(new codecvt<char,...>);
> install(new codecvt<wchar_t,...>);
> install(new num_get<char>);
> ... etc. ...
>
> So just the act of default constructing a locale instantiates all of 
> the facets for all of the anticipated template parameters.

Of course, now I see, sorry about the dumb doubt. Thanks also for the
additional details about the extended functionality! Looking forward, I
hope the idea can be implemented in the presence of caching, without too
much additional complexity... And without breaking binary compatibility?
For the next ideas for enhancements you come up with, I would suggest
trying to figure out by and large whether in principle can be
implemented in a binary compatible way, or not, and adding that info to
Bugzilla.

To be sure, I'm going to file the enhancement PR, anyway...

Paolo.


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