This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] libstdc++/7811


> I don't know what the C++ says about extra locale categories,
> but the sensible thing to do is to include all the categories setlocale
> understands in the composite name even if C++ doesn't do anything with
> them.  Otherwise, you could lose some settings going from a user's
> LANG environment variable -> C++ -> environment -> C setlocale.
> That case can be handled right by just preserving the user's setting.
> But if it's actually multiple LC_* vars -> C++ -> just LANG -> C,
> then you would want to make sure that the C++ code collecting environment
> variables collects all the ones that setlocale would.

The following categores are specified by C++:

    static const category none		= 0;
    static const category ctype 	= 1L << 0;
    static const category numeric 	= 1L << 1;
    static const category collate  	= 1L << 2;
    static const category time 		= 1L << 3;
    static const category monetary 	= 1L << 4;
    static const category messages 	= 1L << 5;
    static const category all 		= (collate | ctype | monetary |
				 	   numeric | time  | messages);

There are more for C/POSIX.

-benjamin 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]