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
2023-06-29 10:46:54 +03:00
parent 30afb9e183
commit 82b98fb757
6 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -82,7 +82,7 @@ int main()
STATIC_ASSERT( v.index() == 1 );
STATIC_ASSERT( holds_alternative<float>(v) );
STATIC_ASSERT( get<1>(v) == 3.14f );
STATIC_ASSERT( get<1>(v) == (float)3.14f ); // see FLT_EVAL_METHOD
}
{
@@ -97,7 +97,7 @@ int main()
STATIC_ASSERT( v.index() == 2 );
STATIC_ASSERT( holds_alternative<float>(v) );
STATIC_ASSERT( get<2>(v) == 3.14f );
STATIC_ASSERT( get<2>(v) == (float)3.14f );
}
{