Created on 2014-06-09.00:00:00 last changed 90 months ago
Proposed resolution:
This wording is relative to N4606.
Change [locale.members] as indicated:
basic_string<char> name() const;-5- Returns: The name of *this, if it has one; otherwise, the string "*".
If *this has a name, then locale(name().c_str()) is equivalent to *this. Details of the contents of the resulting string are otherwise implementation-defined.
[ 2016-08 - Chicago ]
Thurs PM: Moved to Tentatively Ready
[ 2016-08-03 Chicago LWG ]
Walter, Nevin, and Jason provide initial Proposed Resolution.
[locale.members] p5 says:
Returns: The name of *this, if it has one; otherwise, the string "*". If *this has a name, then locale(name().c_str()) is equivalent to *this. Details of the contents of the resulting string are otherwise implementation-defined.
So… what is implementation-defined here, exactly? The first sentence completely defines the behavior of this function in all cases.
Also, the second sentence says (effectively) that all locales with the same name are equivalent: given L1 and L2 that have the same name N, they are both equivalent to locale(N), and since there is no definition of "equivalent" specific to locale, I assume it's the normal transitive equivalence property, which would imply that L1 is equivalent to L2. I'm not sure why this central fact is in the description of locale::name, nor why it's written in this roundabout way.History | |||
---|---|---|---|
Date | User | Action | Args |
2017-07-30 20:15:43 | admin | set | status: wp -> c++17 |
2016-11-14 03:59:28 | admin | set | status: pending -> wp |
2016-11-14 03:55:22 | admin | set | status: ready -> pending |
2016-08-05 03:58:49 | admin | set | messages: + msg8419 |
2016-08-05 03:58:49 | admin | set | status: new -> ready |
2016-08-04 18:28:00 | admin | set | messages: + msg8398 |
2016-08-04 18:28:00 | admin | set | messages: + msg8397 |
2014-06-09 00:00:00 | admin | create |