public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108323] New: combine does not change the locale name
@ 2023-01-07  0:37 liweifriends at gmail dot com
  2023-01-07  2:03 ` [Bug libstdc++/108323] " redi at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: liweifriends at gmail dot com @ 2023-01-07  0:37 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-05-22 22:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07  0:37 [Bug c++/108323] New: combine does not change the locale name liweifriends at gmail dot com
2023-01-07  2:03 ` [Bug libstdc++/108323] " redi at gcc dot gnu.org
2024-01-30 13:29 ` redi at gcc dot gnu.org
2024-02-01 12:50 ` redi at gcc dot gnu.org
2024-02-01 12:51 ` redi at gcc dot gnu.org
2024-05-22 22:33 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).