Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
locale: use nullptr as default locale on Windows too
Browse files Browse the repository at this point in the history
Since stdex::locale_default is inline, it is initialized by the first
module referencing it. Not necessarily compiled with the same _CONSOLE
definition as other modules. This makes the default locale fluid.

Signed-off-by: Simon Rozman <[email protected]>
  • Loading branch information
rozmansi committed Feb 19, 2024
1 parent 87d678f commit f689011
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions include/stdex/locale.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,7 @@ namespace stdex
///
/// Reusable default charset locale
///
const inline locale locale_default(
#ifdef WIN32
#ifdef _CONSOLE
create_locale(LC_ALL, ".OCP")
#else
create_locale(LC_ALL, ".ACP")
#endif
#else
nullptr
#endif
);
const inline locale locale_default(nullptr);
}

#if defined(__GNUC__)
Expand Down

0 comments on commit f689011

Please sign in to comment.