https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108323

            Bug ID: 108323
           Summary: combine does not change the locale name
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liweifriends at gmail dot com
  Target Milestone: ---

for the following code
```
#include <iostream>
#include <locale>

int main()
{
    std::locale loc = std::locale()
        .combine<std::numpunct<char>>(std::locale("en_US.UTF-8"));
    std::cout << loc.name() << '\n';

    std::cout << (std::locale() == loc);

}
```

gcc outputs 'C' and '1' (https://godbolt.org/z/q8fT4oqj3), which seems a bug?
Because locale::combine should return a new and nameless locale.
  • [Bug c++/108323] New: combine d... liweifriends at gmail dot com via Gcc-bugs

Reply via email to