Skip to content

Suppress -Wcharacter-conversion for tests/VSO_0180466_algorithm_overhauls #5657

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

YexuanXiao
Copy link
Contributor

Lines 35-84 of this test involve comparisons between different charN_t types, so similar to #5653, Clang will also generate warnings for this.

template <template <class, class> class Test, class Left>
void test_all_numeric_types_impl() {
Test<Left, char>{}();
Test<Left, signed char>{}();
Test<Left, unsigned char>{}();
Test<Left, wchar_t>{}();
#ifdef __cpp_char8_t
Test<Left, char8_t>{}();
#endif // __cpp_char8_t
Test<Left, char16_t>{}();
Test<Left, char32_t>{}();
Test<Left, short>{}();
Test<Left, unsigned short>{}();
Test<Left, int>{}();
Test<Left, unsigned int>{}();
Test<Left, long>{}();
Test<Left, unsigned long>{}();
Test<Left, long long>{}();
Test<Left, unsigned long long>{}();
Test<Left, float>{}();
Test<Left, double>{}();
Test<Left, long double>{}();
}
template <template <class, class> class Test>
void test_all_numeric_types() {
test_all_numeric_types_impl<Test, char>();
test_all_numeric_types_impl<Test, signed char>();
test_all_numeric_types_impl<Test, unsigned char>();
test_all_numeric_types_impl<Test, wchar_t>();
#ifdef __cpp_char8_t
test_all_numeric_types_impl<Test, char8_t>();
#endif // __cpp_char8_t
test_all_numeric_types_impl<Test, char16_t>();
test_all_numeric_types_impl<Test, char32_t>();
test_all_numeric_types_impl<Test, short>();
test_all_numeric_types_impl<Test, unsigned short>();
test_all_numeric_types_impl<Test, int>();
test_all_numeric_types_impl<Test, unsigned int>();
test_all_numeric_types_impl<Test, long>();
test_all_numeric_types_impl<Test, unsigned long>();
test_all_numeric_types_impl<Test, long long>();
test_all_numeric_types_impl<Test, unsigned long long>();
test_all_numeric_types_impl<Test, float>();
test_all_numeric_types_impl<Test, double>();
test_all_numeric_types_impl<Test, long double>();
#ifdef __cpp_lib_byte
Test<byte, byte>{}();
#endif // __cpp_lib_byte
}

@YexuanXiao YexuanXiao requested a review from a team as a code owner July 26, 2025 09:53
@github-project-automation github-project-automation bot moved this to Initial Review in STL Code Reviews Jul 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Initial Review
Development

Successfully merging this pull request may close these issues.

1 participant