Skip to content

Commit a8fc7ce

Browse files
[libc++][test] Explicit cast in nasty_char_traits::to_char_type
1 parent 79210fe commit a8fc7ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/test/support/nasty_string.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct nasty_char_traits {
7070

7171
static constexpr int_type not_eof(int_type c) noexcept { return eq_int_type(c, eof()) ? ~eof() : c; }
7272

73-
static constexpr char_type to_char_type(int_type c) noexcept { return char_type(c); }
73+
static constexpr char_type to_char_type(int_type c) noexcept { return {static_cast<char>(c)}; }
7474

7575
static constexpr int_type to_int_type(char_type c) noexcept { return int_type(c.c); }
7676

0 commit comments

Comments
 (0)