Re: std::runtime_error on std::locale("")

2023-09-23 Thread Takashi Yano via Cygwin
On Sat, 23 Sep 2023 17:23:59 +0900 Takashi Yano via Cygwin wrote: > On Fri, 22 Sep 2023 08:48:45 +0200 > ASSI wrote: > > Takashi Yano via Cygwin writes: > > > I wonder why the following code throws std::runtime_error > > > even though the LC_ALL is set to valid locale other than "C". > > > This

Re: std::runtime_error on std::locale("")

2023-09-23 Thread Takashi Yano via Cygwin
On Fri, 22 Sep 2023 08:48:45 +0200 ASSI wrote: > Takashi Yano via Cygwin writes: > > I wonder why the following code throws std::runtime_error > > even though the LC_ALL is set to valid locale other than "C". > > This does not occur only when LC_ALL is set to "C". > > This functionality is curren

Re: std::runtime_error on std::locale("")

2023-09-22 Thread Brian Inglis via Cygwin
On 2023-09-21 23:56, Martin Wege via Cygwin wrote: On Thu, Sep 21, 2023 at 9:07 PM Christian Franke via Cygwin wrote: Brian Inglis via Cygwin wrote: On 2023-09-21 10:28, Takashi Yano via Cygwin wrote: On Fri, 22 Sep 2023 01:12:04 +0900 Takashi Yano wrote: I wonder why the following code thr

Re: std::runtime_error on std::locale("")

2023-09-22 Thread Christian Franke via Cygwin
Takashi Yano via Cygwin wrote: On Thu, 21 Sep 2023 21:06:59 +0200 Christian Franke wrote: ... According to libstdc++ source, the internal function locale::facet::_S_create_c_locale() calls some __newlocale() which apparently does not arrive at newlocale() from cygwin1.dll. But cygstdc++-6.dll im

Re: std::runtime_error on std::locale("")

2023-09-21 Thread ASSI via Cygwin
Takashi Yano via Cygwin writes: > I wonder why the following code throws std::runtime_error > even though the LC_ALL is set to valid locale other than "C". > This does not occur only when LC_ALL is set to "C". This functionality is currently only supported for Glibc targets in libstdc++. I seem t

Re: std::runtime_error on std::locale("")

2023-09-21 Thread Martin Wege via Cygwin
On Thu, Sep 21, 2023 at 9:07 PM Christian Franke via Cygwin wrote: > > Brian Inglis via Cygwin wrote: > > On 2023-09-21 10:28, Takashi Yano via Cygwin wrote: > >> On Fri, 22 Sep 2023 01:12:04 +0900 > >> Takashi Yano wrote: > >>> I wonder why the following code throws std::runtime_error > >>> even

Re: std::runtime_error on std::locale("")

2023-09-21 Thread Takashi Yano via Cygwin
On Thu, 21 Sep 2023 21:06:59 +0200 Christian Franke wrote: > Brian Inglis via Cygwin wrote: > > On 2023-09-21 10:28, Takashi Yano via Cygwin wrote: > >> On Fri, 22 Sep 2023 01:12:04 +0900 > >> Takashi Yano wrote: > >>> I wonder why the following code throws std::runtime_error > >>> even though the

Re: std::runtime_error on std::locale("")

2023-09-21 Thread Christian Franke via Cygwin
Brian Inglis via Cygwin wrote: On 2023-09-21 10:28, Takashi Yano via Cygwin wrote: On Fri, 22 Sep 2023 01:12:04 +0900 Takashi Yano wrote: I wonder why the following code throws std::runtime_error even though the LC_ALL is set to valid locale other than "C". This does not occur only when LC_ALL

Re: std::runtime_error on std::locale("")

2023-09-21 Thread Brian Inglis via Cygwin
On 2023-09-21 10:28, Takashi Yano via Cygwin wrote: On Fri, 22 Sep 2023 01:12:04 +0900 Takashi Yano wrote: I wonder why the following code throws std::runtime_error even though the LC_ALL is set to valid locale other than "C". This does not occur only when LC_ALL is set to "C". #include int ma

Re: std::runtime_error on std::locale("")

2023-09-21 Thread Takashi Yano via Cygwin
On Fri, 22 Sep 2023 01:12:04 +0900 Takashi Yano wrote: > I wonder why the following code throws std::runtime_error > even though the LC_ALL is set to valid locale other than "C". > This does not occur only when LC_ALL is set to "C". > > #include > int main() > { > std::locale(""); > r

std::runtime_error on std::locale("")

2023-09-21 Thread Takashi Yano via Cygwin
I wonder why the following code throws std::runtime_error even though the LC_ALL is set to valid locale other than "C". This does not occur only when LC_ALL is set to "C". #include int main() { std::locale(""); return 0; } In linux, this occurs only when the LC_ALL is set to inva