Change 3.3f to 3.25f to avoid equality issues with inexact float literal constants

This commit is contained in:
Peter Dimov
2023-09-28 21:37:14 +03:00
parent db3fd72bb5
commit cd5cac8d76

View File

@ -421,9 +421,9 @@ void cons_test()
// ----------------------------------------------------------------------------
void const_tuple_test()
{
const tuple<int, float> t1(5, 3.3f);
const tuple<int, float> t1(5, 3.25f);
BOOST_CHECK(get<0>(t1) == 5);
BOOST_CHECK(get<1>(t1) == 3.3f);
BOOST_CHECK(get<1>(t1) == 3.25f);
}
// ----------------------------------------------------------------------------