File tree Expand file tree Collapse file tree
include/boost/multiprecision Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -296,6 +296,14 @@ struct float128_backend
296296 {
297297 return m_value;
298298 }
299+ BOOST_MP_CXX14_CONSTEXPR float128_type& data ()
300+ {
301+ return m_value;
302+ }
303+ BOOST_MP_CXX14_CONSTEXPR const float128_type& data () const
304+ {
305+ return m_value;
306+ }
299307};
300308
301309inline BOOST_MP_CXX14_CONSTEXPR void eval_add (float128_backend& result, const float128_backend& a)
Original file line number Diff line number Diff line change @@ -1281,6 +1281,7 @@ test-suite misc :
12811281 [ run git_issue_636.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]
12821282 [ run git_issue_652.cpp ]
12831283 [ run git_issue_734.cpp ]
1284+ [ run git_issue_743.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]
12841285 [ run git_issue_759.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]
12851286 [ compile git_issue_98.cpp :
12861287 [ check-target-builds ../config//has_float128 : <define>TEST_FLOAT128 <source>quadmath : ]
Original file line number Diff line number Diff line change 1+ // /////////////////////////////////////////////////////////////////////////////
2+ // Copyright 2026 Matt Borland. Distributed under the Boost
3+ // Software License, Version 1.0. (See accompanying file
4+ // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5+ //
6+ // See: https://github.com/boostorg/multiprecision/issues/743
7+
8+ #include < boost/multiprecision/float128.hpp>
9+ #include " test.hpp"
10+
11+ int main ()
12+ {
13+ using real = boost::multiprecision::float128;
14+
15+ constexpr real value {5 };
16+ BOOST_CHECK (value.backend ().value () == value.backend ().data ());
17+
18+ real mutable_value {42 };
19+ BOOST_CHECK (mutable_value.backend ().value () == mutable_value.backend ().data ());
20+
21+ return boost::report_errors ();
22+ }
You can’t perform that action at this time.
0 commit comments