Skip to content

Problem with application of LWG 436 #595

Closed
@timsong-cpp

Description

@timsong-cpp
Contributor

[locale.facet]/1 (then-called [lib.locale.facet]) read in C++03:

Class facet is the base class for locale feature sets. A class is a facet if it is publicly derived from another facet, or if it is a class derived from locale::facet and containing a publicly-accessible declaration as follows: 221)

static ::std::locale::id id;

Template parameters in this clause which are required to be facets are those named Facet in declarations. A program that passes a type that is not a facet, as an (explicit or deduced) template parameter to a locale function expecting a facet, is ill-formed.

221) This is a complete list of requirements; there are no other requirements. Thus, a facet class need not have a public copy constructor, assignment, default constructor, destructor, etc.

LWG 436's intent appears to be to ban volatile-qualified facets and permitting const-qualified ones. The PR was somewhat poorly worded, however, and the editor in applying it deleted the whole first half of the paragraph, including the definition of facet and the requirement for a static data member named id.

As a result, we have things like [locale.id]/2 and [locale.global.templates]/1 referring to the id member that's not defined anywhere in the working draft.

(If this isn't editorial, I'll be happy to submit an LWG issue instead.)

Activity

burblebee

burblebee commented on Apr 14, 2016

@burblebee
Contributor

I'm not finding LWG436 referenced in any git logs in master, so it's hard to know what happened. Checking the sources, the latex hasn't changed since 2011-08-16. Since it's such an old issue however (from 2010), I think it would be good to run it by LWG again (and ask them to fix the poor wording while they're at it). Please submit an LWG issue for it and close this. Thanks!

self-assigned this
on Nov 13, 2016
mclow

mclow commented on Nov 14, 2016

@mclow
Contributor

Is this different from the resolution of LWG#2694 ?

timsong-cpp

timsong-cpp commented on Nov 14, 2016

@timsong-cpp
ContributorAuthor

Nope, can be closed. I asked here first but then was told to run it by LWG again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

lwgIssue must be reviewed by LWG.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @mclow@burblebee@timsong-cpp@jensmaurer

      Issue actions

        Problem with application of LWG 436 · Issue #595 · cplusplus/draft