Title
Facet definition incomplete
Status
tc1
Section
[locale.global.templates]
Submitter
Nathan Myers

Created on 1998-08-06.00:00:00 last changed 172 months ago

Messages

Date: 2010-10-21.18:28:33

[ Kona: strike as overspecification the text "(not inherits)" from the original resolution, which read "... whose definition contains (not inherits) the public static member id..." ]

Date: 2010-10-21.18:28:33

Proposed resolution:

In the definition of std::use_facet<>(), replace the text in paragraph 1 which reads:

Get a reference to a facet of a locale.

with:

Requires: Facet is a facet class whose definition contains the public static member id as defined in [locale.facet].

Date: 1998-08-06.00:00:00

It has been noticed by Esa Pulkkinen that the definition of "facet" is incomplete. In particular, a class derived from another facet, but which does not define a member id, cannot safely serve as the argument F to use_facet<F>(loc), because there is no guarantee that a reference to the facet instance stored in loc is safely convertible to F.

History
Date User Action Args
2010-10-21 18:28:33adminsetmessages: + msg86
2010-10-21 18:28:33adminsetmessages: + msg85
1998-08-06 00:00:00admincreate