Try to suppress MVSC warn of narrowing (#2230)

This commit is contained in:
denchat 2021-04-13 21:30:43 +07:00 committed by GitHub
parent a1c6bfd77b
commit 24c9751558
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -771,7 +771,8 @@ TEST(FormatterTest, SpaceSign) {
TEST(FormatterTest, SignNotTruncated) {
wchar_t format_str[] = {L'{', L':',
'+' | (1 << fmt::detail::num_bits<char>()), L'}', 0};
'+' | static_cast<wchar_t>(1 << fmt::detail::num_bits<char>()),
L'}', 0};
EXPECT_THROW(format(format_str, 42), format_error);
}