From cc0568302f50361a84325f9fa70d3fbfb1d04547 Mon Sep 17 00:00:00 2001 From: ckormanyos Date: Thu, 4 Sep 2025 12:02:41 +0200 Subject: [PATCH] Default-constructed values are zero --- .../boost/multiprecision/cpp_df_qf/cpp_df_qf_detail.hpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail.hpp b/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail.hpp index 51095a5a..b2f60d69 100644 --- a/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail.hpp +++ b/include/boost/multiprecision/cpp_df_qf/cpp_df_qf_detail.hpp @@ -56,15 +56,12 @@ struct pair using float_type = FloatingPointTypeA; - #if (defined(BOOST_CXX_VERSION) && (BOOST_CXX_VERSION >= 202002L)) float_type first; float_type second; - #else - float_type first { }; - float_type second { }; - #endif - constexpr pair() noexcept { } + // Default-constructed cpp_double_fp_backend values are zero. + constexpr pair() noexcept : first { }, second { } { } + constexpr pair(float_type a, float_type b) noexcept : first { a }, second { b } { } constexpr pair(const pair& other) noexcept : first { other.first }, second { other.second } { } constexpr pair(pair&& other) noexcept : first { other.first }, second { other.second } { }