Skip to content

Commit 38f6284

Browse files
committed
setlocale is in global namespace on mac os
1 parent 70d1711 commit 38f6284

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/pipeline.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88

99
jobs:
1010
linux-builds:
11-
name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
11+
name: linux ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
1212
runs-on: ubuntu-latest
1313
strategy:
1414
fail-fast: false
@@ -104,9 +104,10 @@ jobs:
104104
shell: cmd
105105

106106
macos-builds:
107-
name: ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
107+
name: macos ${{matrix.cxx}}, C++${{matrix.std}}, ${{matrix.build_type}}
108108
runs-on: macos-latest
109109
strategy:
110+
fail-fast: false
110111
matrix:
111112
cxx:
112113
- g++

test/locale_testing/test_locale_main.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ class testRunListener : public Catch::EventListenerBase {
1313
using Catch::EventListenerBase::EventListenerBase;
1414

1515
void testRunStarting(Catch::TestRunInfo const&) override {
16-
prev_loc = std::setlocale(LC_ALL, nullptr);
16+
// Mac OS uses global and c++ standard uses the std. Using this to remove ambiguity between the two.
17+
prev_loc = ::setlocale(LC_ALL, nullptr);
1718
// Set the locale to something that has , instead of . for floats
1819
std::locale::global(std::locale("de_DE.UTF-8"));
1920
}

0 commit comments

Comments
 (0)