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.