Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/boost/multiprecision/float128.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ struct float128_backend
{
return m_value;
}
BOOST_MP_CXX14_CONSTEXPR float128_type& data()
{
return m_value;
}
BOOST_MP_CXX14_CONSTEXPR const float128_type& data() const
{
return m_value;
}
};

inline BOOST_MP_CXX14_CONSTEXPR void eval_add(float128_backend& result, const float128_backend& a)
Expand Down
1 change: 1 addition & 0 deletions test/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,7 @@ test-suite misc :
[ run git_issue_636.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]
[ run git_issue_652.cpp ]
[ run git_issue_734.cpp ]
[ run git_issue_743.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]
[ run git_issue_759.cpp : : : [ check-target-builds ../config//has_float128 : <source>quadmath : <build>no ] ]
[ compile git_issue_98.cpp :
[ check-target-builds ../config//has_float128 : <define>TEST_FLOAT128 <source>quadmath : ]
Expand Down
22 changes: 22 additions & 0 deletions test/git_issue_743.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright 2026 Matt Borland. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See: https://github.com/boostorg/multiprecision/issues/743

#include <boost/multiprecision/float128.hpp>
#include "test.hpp"

int main()
{
using real = boost::multiprecision::float128;

constexpr real value {5};
BOOST_CHECK(value.backend().value() == value.backend().data());

real mutable_value {42};
BOOST_CHECK(mutable_value.backend().value() == mutable_value.backend().data());

return boost::report_errors();
}
Loading