diff --git a/test/variant_get_by_index_cx.cpp b/test/variant_get_by_index_cx.cpp index 026b9d3..949e39c 100644 --- a/test/variant_get_by_index_cx.cpp +++ b/test/variant_get_by_index_cx.cpp @@ -58,7 +58,7 @@ int main() { constexpr variant v( 3.14f ); - STATIC_ASSERT( get<1>(v) == 3.14f ); + STATIC_ASSERT( get<1>(v) == (float)3.14f ); // see FLT_EVAL_METHOD STATIC_ASSERT_IF( get_if<0>(&v) == nullptr ); STATIC_ASSERT_IF( get_if<1>(&v) == &get<1>(v) ); @@ -87,7 +87,7 @@ int main() { constexpr variant v( 3.14f ); - STATIC_ASSERT( get<2>(v) == 3.14f ); + STATIC_ASSERT( get<2>(v) == (float)3.14f ); STATIC_ASSERT_IF( get_if<0>(&v) == nullptr ); STATIC_ASSERT_IF( get_if<1>(&v) == nullptr ); diff --git a/test/variant_get_by_type_cx.cpp b/test/variant_get_by_type_cx.cpp index 0f9a40c..d2777c8 100644 --- a/test/variant_get_by_type_cx.cpp +++ b/test/variant_get_by_type_cx.cpp @@ -58,7 +58,7 @@ int main() { constexpr variant v( 3.14f ); - STATIC_ASSERT( get(v) == 3.14f ); + STATIC_ASSERT( get(v) == (float)3.14f ); // see FLT_EVAL_METHOD STATIC_ASSERT_IF( get_if(&v) == nullptr ); STATIC_ASSERT_IF( get_if(&v) == &get(v) ); @@ -83,7 +83,7 @@ int main() { constexpr variant v( 3.14f ); - STATIC_ASSERT( get(v) == 3.14f ); + STATIC_ASSERT( get(v) == (float)3.14f ); STATIC_ASSERT_IF( get_if(&v) == &get(v) ); } diff --git a/test/variant_in_place_index_construct_cx.cpp b/test/variant_in_place_index_construct_cx.cpp index ea4b3ab..c8d85fe 100644 --- a/test/variant_in_place_index_construct_cx.cpp +++ b/test/variant_in_place_index_construct_cx.cpp @@ -68,7 +68,7 @@ int main() constexpr variant v( in_place_index_t<1>{}, 3.14f ); STATIC_ASSERT( v.index() == 1 ); - STATIC_ASSERT( get<1>(v) == 3.14f ); + STATIC_ASSERT( get<1>(v) == (float)3.14f ); // see FLT_EVAL_METHOD } { @@ -89,14 +89,14 @@ int main() constexpr variant v( in_place_index_t<2>{}, 3.14f ); STATIC_ASSERT( v.index() == 2 ); - STATIC_ASSERT( get<2>(v) == 3.14f ); + STATIC_ASSERT( get<2>(v) == (float)3.14f ); } { constexpr variant v( in_place_index_t<3>{}, 3.14f ); STATIC_ASSERT( v.index() == 3 ); - STATIC_ASSERT( get<3>(v) == 3.14f ); + STATIC_ASSERT( get<3>(v) == (float)3.14f ); } { diff --git a/test/variant_in_place_type_construct_cx.cpp b/test/variant_in_place_type_construct_cx.cpp index 832de3d..a9a8e4e 100644 --- a/test/variant_in_place_type_construct_cx.cpp +++ b/test/variant_in_place_type_construct_cx.cpp @@ -80,7 +80,7 @@ int main() constexpr variant v( in_place_type_t{}, 3.14f ); STATIC_ASSERT( v.index() == 1 ); - STATIC_ASSERT( get<1>(v) == 3.14f ); + STATIC_ASSERT( get<1>(v) == (float)3.14f ); // see FLT_EVAL_METHOD STATIC_ASSERT( holds_alternative(v) ); } @@ -89,7 +89,7 @@ int main() constexpr variant v( in_place_type_t{}, 3.14f ); STATIC_ASSERT( v.index() == 2 ); - STATIC_ASSERT( get<2>(v) == 3.14f ); + STATIC_ASSERT( get<2>(v) == (float)3.14f ); STATIC_ASSERT( holds_alternative(v) ); } diff --git a/test/variant_value_construct_cx.cpp b/test/variant_value_construct_cx.cpp index 5ffad25..e055569 100644 --- a/test/variant_value_construct_cx.cpp +++ b/test/variant_value_construct_cx.cpp @@ -82,7 +82,7 @@ int main() STATIC_ASSERT( v.index() == 1 ); STATIC_ASSERT( holds_alternative(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(v) ); - STATIC_ASSERT( get<2>(v) == 3.14f ); + STATIC_ASSERT( get<2>(v) == (float)3.14f ); } { diff --git a/test/variant_visit_r.cpp b/test/variant_visit_r.cpp index 15ab60a..7b69e09 100644 --- a/test/variant_visit_r.cpp +++ b/test/variant_visit_r.cpp @@ -72,7 +72,7 @@ int main() variant const v2( 3.14f ); BOOST_TEST_EQ( visit( F2(), v1, v2 ), 4 ); - BOOST_TEST_EQ( visit( F2(), v1, v2 ), 1 + 3.14f ); + BOOST_TEST_EQ( visit( F2(), v1, v2 ), static_cast( 1 + 3.14f ) ); // see FLT_EVAL_METHOD } {