Skip to content

Commit fb80e89

Browse files
mordantecopybara-github
authored andcommitted
[libc++] Fixes charconv operator bool tests. (#80598)
This was spotted by @philnik. NOKEYCHECK=True GitOrigin-RevId: 7291761669dd63624ccaab30887aca7e9c7d3273
1 parent 20b1631 commit fb80e89

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/std/utilities/charconv/charconv.syn/from_chars_result.operator_bool.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ constexpr bool test() {
2828
{
2929
std::from_chars_result value{nullptr, std::errc{}};
3030
assert(bool(value) == true);
31-
static_assert(noexcept(bool(true)) == true);
31+
static_assert(noexcept(bool(value)) == true);
3232
}
3333
// False
3434
{
3535
std::from_chars_result value{nullptr, std::errc::value_too_large};
3636
assert(bool(value) == false);
37-
static_assert(noexcept(bool(true)) == true);
37+
static_assert(noexcept(bool(value)) == true);
3838
}
3939

4040
return true;

test/std/utilities/charconv/charconv.syn/to_chars_result.operator_bool.pass.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ constexpr bool test() {
2828
{
2929
std::to_chars_result value{nullptr, std::errc{}};
3030
assert(bool(value) == true);
31-
static_assert(noexcept(bool(true)) == true);
31+
static_assert(noexcept(bool(value)) == true);
3232
}
3333
// False
3434
{
3535
std::to_chars_result value{nullptr, std::errc::value_too_large};
3636
assert(bool(value) == false);
37-
static_assert(noexcept(bool(true)) == true);
37+
static_assert(noexcept(bool(value)) == true);
3838
}
3939

4040
return true;

0 commit comments

Comments
 (0)