Commit 643b7bcd authored by Jake Egan's avatar Jake Egan
Browse files

[libc++] Fix simple cases of locale name construction

When using the following constructors:

```
locale(const locale& other, const char* std_name, category cat);
locale(const locale& other, const string& std_name, category cat);
locale(const locale& other, const locale& one, category cats);
```
The new locale name is always "*". Locale names formed from parts of two named locales (that is, C++ locales having names) are supposed to have names in turn (see C++20 subclause 28.3.1.1 [locale.general] paragraph 8). This patch fixes the name construction for cases when either of locales are unnamed, when the category is locale::none, and when the two locale names are the same.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D119441
parent cfbe86cc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment