2
0
mirror of https://github.com/boostorg/uuid.git synced 2026-01-19 04:42:16 +00:00

Added from_chars_result::operator bool().

This commit is contained in:
Andrey Semashev
2025-12-26 20:19:24 +03:00
parent c963533f73
commit 31bc20e30e
4 changed files with 18 additions and 0 deletions

View File

@@ -22,6 +22,8 @@ template<class Ch> void test( uuid const& expected, Ch const* str )
BOOST_TEST( r.ec == from_chars_error::none );
BOOST_TEST_EQ( static_cast<int>( r.ec ), 0 );
BOOST_TEST( static_cast<bool>( r ) );
BOOST_TEST( !!r );
BOOST_TEST_EQ( u, expected );
}

View File

@@ -22,6 +22,7 @@ template<class Ch> void test( Ch const* str, int pos, from_chars_error err )
BOOST_TEST( r.ec == err );
BOOST_TEST_EQ( static_cast<int>( r.ec ), static_cast<int>( err ) );
BOOST_TEST_EQ( static_cast<bool>( r ), ( err == from_chars_error::none ) );
}
int main()