Skip to content

Commit dc6068d

Browse files
committed
Fix gcc-13 macOS compile failure
1 parent bd1d96b commit dc6068d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_snprintf.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ void test_uppercase(T value, const char* format_sprintf, chars_format fmt = char
7777
BOOST_TEST_EQ(num_bytes, r.ptr - charconv_buffer);
7878
}
7979

80+
#if !(defined(__APPLE__) && defined(__GNUC__) && !defined(__clang__))
8081
void test_locales()
8182
{
8283
const char buffer[] = "1,1897e+02";
@@ -89,7 +90,7 @@ void test_locales()
8990
std::locale::global(std::locale("de_DE.UTF-8"));
9091
#endif
9192
}
92-
// LCOV_EXCL_START
93+
// LCOV_EXCL_START
9394
catch (...)
9495
{
9596
std::cerr << "Locale not installed. Skipping test." << std::endl;
@@ -101,6 +102,7 @@ void test_locales()
101102
snprintf(printf_buffer, sizeof(printf_buffer), "%.4De", decimal64{11897, -2});
102103
BOOST_TEST_CSTR_EQ(printf_buffer, buffer);
103104
}
105+
#endif
104106

105107
template <typename T>
106108
void test_bootstrap()
@@ -174,7 +176,10 @@ int main()
174176
test_bootstrap<decimal64>();
175177
test_bootstrap<decimal128>();
176178

179+
// Homebrew gcc on mac does not support locales
180+
#if !(defined(__APPLE__) && defined(__GNUC__) && !defined(__clang__))
177181
test_locales();
182+
#endif
178183

179184
return boost::report_errors();
180185
}

0 commit comments

Comments
 (0)