Cast 3.14f to float because FLT_EVAL_METHOD (see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108742) for discussion

This commit is contained in:
Peter Dimov committed 2023-06-29 10:46:54 +03:00
1 parent 30afb9e183
commit 82b98fb757
6 files changed
+12 -12

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@ int main()
variant<int, float> const v2( 3.14f );
BOOST_TEST_EQ( visit<int>( F2(), v1, v2 ), 4 );
BOOST_TEST_EQ( visit<float>( F2(), v1, v2 ), 1 + 3.14f );
BOOST_TEST_EQ( visit<float>( F2(), v1, v2 ), static_cast<float>( 1 + 3.14f ) ); // see FLT_EVAL_METHOD
}
{