mirror of
https://github.com/boostorg/integer.git
synced 2025-07-29 20:27:14 +02:00
Fix min/max usage violation.
[SVN r43145]
This commit is contained in:
committed by
Peter Dimov
parent
307fee457a
commit
217fa37de2
@ -129,6 +129,7 @@ typedef ::boost::mpl::list<unsigned char, unsigned short, unsigned,
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
#define BOOST_NO_MACRO_EXPAND /**/
|
||||||
|
|
||||||
// Specialize numeric_limits for _some_ of our types
|
// Specialize numeric_limits for _some_ of our types
|
||||||
namespace std
|
namespace std
|
||||||
@ -143,8 +144,8 @@ class numeric_limits< MyInt1 >
|
|||||||
public:
|
public:
|
||||||
BOOST_STATIC_CONSTANT(bool, is_specialized = limits_type::is_specialized);
|
BOOST_STATIC_CONSTANT(bool, is_specialized = limits_type::is_specialized);
|
||||||
|
|
||||||
static MyInt1 min() throw() { return limits_type::min(); }
|
static MyInt1 min BOOST_NO_MACRO_EXPAND() throw() { return (limits_type::min)(); }
|
||||||
static MyInt1 max() throw() { return limits_type::max(); }
|
static MyInt1 max BOOST_NO_MACRO_EXPAND() throw() { return (limits_type::max)(); }
|
||||||
|
|
||||||
BOOST_STATIC_CONSTANT(int, digits = limits_type::digits);
|
BOOST_STATIC_CONSTANT(int, digits = limits_type::digits);
|
||||||
BOOST_STATIC_CONSTANT(int, digits10 = limits_type::digits10);
|
BOOST_STATIC_CONSTANT(int, digits10 = limits_type::digits10);
|
||||||
@ -190,8 +191,8 @@ class numeric_limits< MyUnsigned1 >
|
|||||||
public:
|
public:
|
||||||
BOOST_STATIC_CONSTANT(bool, is_specialized = limits_type::is_specialized);
|
BOOST_STATIC_CONSTANT(bool, is_specialized = limits_type::is_specialized);
|
||||||
|
|
||||||
static MyUnsigned1 min() throw() { return limits_type::min(); }
|
static MyUnsigned1 min BOOST_NO_MACRO_EXPAND() throw() { return (limits_type::min)(); }
|
||||||
static MyUnsigned1 max() throw() { return limits_type::max(); }
|
static MyUnsigned1 max BOOST_NO_MACRO_EXPAND() throw() { return (limits_type::max)(); }
|
||||||
|
|
||||||
BOOST_STATIC_CONSTANT(int, digits = limits_type::digits);
|
BOOST_STATIC_CONSTANT(int, digits = limits_type::digits);
|
||||||
BOOST_STATIC_CONSTANT(int, digits10 = limits_type::digits10);
|
BOOST_STATIC_CONSTANT(int, digits10 = limits_type::digits10);
|
||||||
|
Reference in New Issue
Block a user