From 38f6284fcb202f946d98a5ef4c56c7891959d090 Mon Sep 17 00:00:00 2001 From: Devon Adair Date: Sun, 28 Jan 2024 13:38:57 -0500 Subject: [PATCH] setlocale is in global namespace on mac os --- .github/workflows/pipeline.yml | 5 +++-- test/locale_testing/test_locale_main.cpp | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 590d7f8..2bda82a 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -8,7 +8,7 @@ env: jobs: linux-builds: - name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} + name: linux ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} runs-on: ubuntu-latest strategy: fail-fast: false @@ -104,9 +104,10 @@ jobs: shell: cmd macos-builds: - name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} + name: macos ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}} runs-on: macos-latest strategy: + fail-fast: false matrix: cxx: - g++ diff --git a/test/locale_testing/test_locale_main.cpp b/test/locale_testing/test_locale_main.cpp index 159e12c..4f99b20 100644 --- a/test/locale_testing/test_locale_main.cpp +++ b/test/locale_testing/test_locale_main.cpp @@ -13,7 +13,8 @@ class testRunListener : public Catch::EventListenerBase { using Catch::EventListenerBase::EventListenerBase; void testRunStarting(Catch::TestRunInfo const&) override { - prev_loc = std::setlocale(LC_ALL, nullptr); + // Mac OS uses global and c++ standard uses the std. Using this to remove ambiguity between the two. + prev_loc = ::setlocale(LC_ALL, nullptr); // Set the locale to something that has , instead of . for floats std::locale::global(std::locale("de_DE.UTF-8")); }