File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed
Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ run crash_report_1.cpp ;
4949run github_issue_426.cpp ;
5050run github_issue_448.cpp ;
5151run-fail github_issue_519.cpp ;
52+ run github_issue_799.cpp ;
5253run link_1.cpp link_2.cpp link_3.cpp ;
5354run quick.cpp ;
5455run random_decimal32_comp.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+ #include < boost/decimal.hpp>
6+ #include < boost/core/lightweight_test.hpp>
7+ #include < iostream>
8+
9+ #ifdef BOOST_DECIMAL_HAS_INT128
10+
11+ template <typename Dec>
12+ void mixed_compare ()
13+ {
14+ const Dec a{2 , 1 };
15+ const auto b = __uint128_t {std::numeric_limits<__uint128_t >::max () - std::numeric_limits<uint64_t >::max () + 20 };
16+ BOOST_TEST (a != b);
17+ }
18+
19+ int main ()
20+ {
21+ using namespace boost ::decimal;
22+
23+ mixed_compare<decimal32>();
24+ mixed_compare<decimal32_fast>();
25+ mixed_compare<decimal64>();
26+ mixed_compare<decimal64_fast>();
27+ mixed_compare<decimal128>();
28+ mixed_compare<decimal128_fast>();
29+
30+ return boost::report_errors ();
31+ }
32+
33+ #else
34+
35+ int main ()
36+ {
37+ return 0 ;
38+ }
39+
40+ #endif
You can’t perform that action at this time.
0 commit comments