File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ run github_issue_1107.cpp ;
7676run github_issue_1110.cpp ;
7777run github_issue_1112.cpp ;
7878run github_issue_1174.cpp ;
79+ run github_issue_1260.cpp ;
7980
8081run link_1.cpp link_2.cpp link_3.cpp ;
8182run quick.cpp ;
Original file line number Diff line number Diff line change 1+ // Copyright 2025 Matt Borland
2+ // Distributed under the Boost Software License, Version 1.0.
3+ // https://www.boost.org/LICENSE_1_0.txt
4+ //
5+ // See: https://github.com/cppalliance/decimal/issues/1260
6+
7+ #include < boost/decimal.hpp>
8+ #include < boost/core/lightweight_test.hpp>
9+
10+ template <typename T>
11+ void test ()
12+ {
13+ const T lhs {" 1E34" };
14+ const T rhs {" -0.51" };
15+ const T res {" 9999999999999999999999999999999999" };
16+
17+ const T add_val {lhs + rhs};
18+ BOOST_TEST_EQ (add_val, res);
19+ }
20+
21+ int main ()
22+ {
23+ test<boost::decimal::decimal128_t >();
24+ test<boost::decimal::decimal_fast128_t >();
25+
26+ return boost::report_errors ();
27+ }
You can’t perform that action at this time.
0 commit comments