Skip to content

[libc++][test] concat_macros.h: Fix TEST_HAS_NO_WIDE_CHARACTERS syntax damage #74987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions libcxx/test/support/concat_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ template <class InIt, class OutIt>
requires(std::output_iterator<OutIt, const char&> &&
(std::same_as<std::iter_value_t<InIt>, char16_t>
# ifndef TEST_HAS_NO_WIDE_CHARACTERS
|| (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 2))
|| (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 2)
# endif
)
))
OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
while (first != last) {
char32_t value = *first++;
Expand Down Expand Up @@ -118,11 +118,11 @@ OutIt test_transcode(InIt first, InIt last, OutIt out_it) {

template <class InIt, class OutIt>
requires(std::output_iterator<OutIt, const char&> &&
(std::same_as<std::iter_value_t<InIt>, char32_t> ||
(std::same_as<std::iter_value_t<InIt>, char32_t>
# ifndef TEST_HAS_NO_WIDE_CHARACTERS
(std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 4))
|| (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 4)
# endif
)
))
OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
while (first != last) {
char32_t value = *first++;
Expand Down