File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 18
18
19
19
#include < limits>
20
20
21
+ #include < boost/config.hpp>
21
22
#include < boost/units/units_fwd.hpp>
22
23
23
24
namespace std {
@@ -30,8 +31,14 @@ class numeric_limits< ::boost::units::quantity<Unit, T> >
30
31
static const bool is_specialized = std::numeric_limits<T>::is_specialized;
31
32
static quantity_type (min)() { return (quantity_type::from_value ((std::numeric_limits<T>::min)())); }
32
33
static quantity_type (max)() { return (quantity_type::from_value ((std::numeric_limits<T>::max)())); }
34
+ #ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
35
+ static quantity_type (lowest)() { return (quantity_type::from_value ((std::numeric_limits<T>::lowest)())); }
36
+ #endif
33
37
static const int digits = std::numeric_limits<T>::digits;
34
38
static const int digits10 = std::numeric_limits<T>::digits10;
39
+ #ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
40
+ static const int max_digits10 = std::numeric_limits<T>::max_digits10;
41
+ #endif
35
42
static const bool is_signed = std::numeric_limits<T>::is_signed;
36
43
static const bool is_integer = std::numeric_limits<T>::is_integer;
37
44
static const bool is_exact = std::numeric_limits<T>::is_exact;
Original file line number Diff line number Diff line change @@ -80,10 +80,16 @@ void do_check() {
80
80
CHECK_FUNCTION (round_error);
81
81
CHECK_FUNCTION (infinity);
82
82
CHECK_FUNCTION (denorm_min);
83
+ #ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
84
+ CHECK_FUNCTION (lowest);
85
+ #endif
83
86
84
87
CHECK_CONSTANT (is_specialized);
85
88
CHECK_CONSTANT (digits);
86
89
CHECK_CONSTANT (digits10);
90
+ #ifndef BOOST_NO_CXX11_NUMERIC_LIMITS
91
+ CHECK_CONSTANT (max_digits10);
92
+ #endif
87
93
CHECK_CONSTANT (is_signed);
88
94
CHECK_CONSTANT (is_integer);
89
95
CHECK_CONSTANT (is_exact);
You can’t perform that action at this time.
0 commit comments