File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ run github_issue_1057.cpp ;
7070compile-fail github_issue_1087.cpp ;
7171run github_issue_1091.cpp ;
7272run github_issue_1094.cpp ;
73+ run github_issue_1106.cpp ;
7374run github_issue_1110.cpp ;
7475run github_issue_1112.cpp ;
7576
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/1094
6+
7+ #include < boost/decimal.hpp>
8+ #include < boost/core/lightweight_test.hpp>
9+ #include < limits>
10+
11+ using namespace boost ::decimal;
12+
13+ template <typename T>
14+ void test ()
15+ {
16+ const auto a {std::numeric_limits<T>::lowest () / 99 };
17+ const T b {1 , 2 };
18+ const auto c {a * b};
19+
20+ BOOST_TEST (isinf (c));
21+ BOOST_TEST (signbit (c));
22+ }
23+
24+ int main ()
25+ {
26+ test<decimal32_t >();
27+ test<decimal64_t >();
28+ test<decimal128_t >();
29+
30+ test<decimal_fast32_t >();
31+ test<decimal_fast64_t >();
32+ test<decimal_fast128_t >();
33+
34+ return boost::report_errors ();
35+ }
You can’t perform that action at this time.
0 commit comments