Skip to content

Commit 99eb843

Browse files
[libc++][test] concat_macros.h: Fix TEST_HAS_NO_WIDE_CHARACTERS syntax damage (#74987)
@mordante This was introduced by #73395 a couple of days ago. This is causing PR checks to fail, [stage3 (generic-no-wide-characters, libcxx-runners-8-set, OFF)](https://github.com/llvm/llvm-project/actions/runs/7154839054/job/19484723909?pr=74254#logs): ``` In file included from /home/runner/_work/llvm-project/llvm-project/libcxx/test/std/utilities/format/format.tuple/format.functions.vformat.pass.cpp:29: /home/runner/_work/llvm-project/llvm-project/libcxx/test/support/concat_macros.h:86:1: error: expected ')' 86 | OutIt test_transcode(InIt first, InIt last, OutIt out_it) { | ^ /home/runner/_work/llvm-project/llvm-project/libcxx/test/support/concat_macros.h:80:11: note: to match this '(' 80 | requires(std::output_iterator<OutIt, const char&> && | ^ /home/runner/_work/llvm-project/llvm-project/libcxx/test/std/utilities/format/format.tuple/format.functions.vformat.pass.cpp:63:2: error: expected unqualified-id 63 | } | ^ ```
1 parent 184290e commit 99eb843

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcxx/test/support/concat_macros.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ template <class InIt, class OutIt>
8080
requires(std::output_iterator<OutIt, const char&> &&
8181
(std::same_as<std::iter_value_t<InIt>, char16_t>
8282
# ifndef TEST_HAS_NO_WIDE_CHARACTERS
83-
|| (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 2))
83+
|| (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 2)
8484
# endif
85-
)
85+
))
8686
OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
8787
while (first != last) {
8888
char32_t value = *first++;
@@ -118,11 +118,11 @@ OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
118118

119119
template <class InIt, class OutIt>
120120
requires(std::output_iterator<OutIt, const char&> &&
121-
(std::same_as<std::iter_value_t<InIt>, char32_t> ||
121+
(std::same_as<std::iter_value_t<InIt>, char32_t>
122122
# ifndef TEST_HAS_NO_WIDE_CHARACTERS
123-
(std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 4))
123+
|| (std::same_as<std::iter_value_t<InIt>, wchar_t> && sizeof(wchar_t) == 4)
124124
# endif
125-
)
125+
))
126126
OutIt test_transcode(InIt first, InIt last, OutIt out_it) {
127127
while (first != last) {
128128
char32_t value = *first++;

0 commit comments

Comments
 (0)