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: Uncacheable facet testcase


Martin Sebor writes:
 > Nathan Myers wrote:
 > > On Wed, Jun 04, 2003 at 12:28:37AM -0400, Jerry Quinn wrote:
 > > 
 > >>I discovered the following (unfortunate) testcase of a facet that
 > >>cannot be cached for later use.  The implication is that in general,
 > >>the facets canot be cached safely.  As best as I can interpret the
 > >>spec, this program is valid.
 > >>...
 > >>bool flip = false;
 > >>... 
 > >>  string_type do_truename() const
 > >>  { if (flip) return "false"; else return "true"; }
 > > 
 > > 
 > > If this example appears to be allowed, that is a defect.  We should
 > > not attempt to support any particular semantics for such a facet.
 > > It was a specific design goal of the locale architecture that all
 > > facet results can be assumed to be stable and cacheable.
 >
 > You're right, it is (or soon will likely be) a defect. We discussed
 > it in some detail last year. The issue that tracks it is 360:
 > 
 > http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/lwg-active.html#360


I'm glad to see that!  I thought this test case just about sunk
caching.  Consider it withdrawn.

Jerry


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