Created on 2002-03-12.00:00:00 last changed 172 months ago
Rationale:
This change is reasonable becuase it clarifies the intent of this part of the standard.
Proposed resolution:
Change the first sentence in 22.1.1, p7 from
In successive calls to a locale facet member function during a call to an iostream inserter or extractor or a streambuf member function, the returned result shall be identical. [Note: This implies that such results may safely be reused without calling the locale facet member function again, and that member functions of iostream classes cannot safely call imbue() themselves, except as specified elsewhere. --end note]
to
In successive calls to a locale facet member function on a facet object installed in the same locale, the returned result shall be identical. ...
22.1.1, p7 (copied below) allows iostream formatters and extractors to make assumptions about the values returned from facet members. However, such assumptions are apparently not guaranteed to hold in other cases (e.g., when the facet members are being called directly rather than as a result of iostream calls, or between successive calls to the same iostream functions with no interevening calls to imbue(), or even when the facet member functions are called from other member functions of other facets). This restriction prevents locale from being implemented efficiently.
History | |||
---|---|---|---|
Date | User | Action | Args |
2010-10-21 18:28:33 | admin | set | messages: + msg2353 |
2010-10-21 18:28:33 | admin | set | messages: + msg2352 |
2002-03-12 00:00:00 | admin | create |