messages_base::catalog
overspecifiedSection: 28.3.4.8.2 [locale.messages] Status: C++14 Submitter: Howard Hinnant Opened: 2011-02-14 Last modified: 2016-01-28
Priority: Not Prioritized
View all issues with C++14 status.
Discussion:
In 28.3.4.8.2 [locale.messages], messages_base::catalog
is specified to be a typedef to int
.
This type is subsequently used to open, access and close catalogs.
However, an OS may have catalog/messaging services that are indexed and managed by types other than int
.
For example POSIX
, publishes the following messaging API:
typedef unspecified nl_catd; nl_catd catopen(const char* name , int oflag); char* catgets(nl_catd catd, int set_id, int msg_id, const char* s); int catclose(nl_catd catd);
I.e., the catalog is managed with an unspecified type, not necessarily an int
.
Mac OS uses a void*
for nl_catd
(which is conforming to the POSIX
standard).
The current messages_base
spec effectively outlaws using the built-in OS messaging service
supplied for this very purpose!
[2011-02-24: Chris Jefferson updates the proposed wording, changing unspecified to unspecified signed integral type]
[2011-03-02: Daniel updates the proposed wording, changing unspecified signed integral type to
unspecified signed integer type (We don't want to allow for bool
or char
)]
[2011-03-24 Madrid meeting]
Consensus that this resolution is the direction we would like to see.
Proposed resolution:
Modify 28.3.4.8.2 [locale.messages]:
namespace std { class messages_base { public: typedefintunspecified signed integer type catalog; }; ... }