forked from boostorg/type_traits
Change these two traits to always use a static constant and not BOOST_STATIC_CONSTANT - otherwise they don't work!
Refs #4669. [SVN r65531]
This commit is contained in:
@ -24,14 +24,19 @@ namespace boost {
|
||||
|
||||
namespace detail{
|
||||
|
||||
#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238)
|
||||
#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
|
||||
|
||||
template <class T>
|
||||
struct is_signed_values
|
||||
{
|
||||
//
|
||||
// Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's
|
||||
// rather than "real" static constants simply doesn't work or give
|
||||
// the correct answer.
|
||||
//
|
||||
typedef typename remove_cv<T>::type no_cv_t;
|
||||
BOOST_STATIC_CONSTANT(no_cv_t, minus_one = (static_cast<no_cv_t>(-1)));
|
||||
BOOST_STATIC_CONSTANT(no_cv_t, zero = (static_cast<no_cv_t>(0)));
|
||||
static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
|
||||
static const no_cv_t zero = (static_cast<no_cv_t>(0));
|
||||
};
|
||||
|
||||
template <class T>
|
||||
|
@ -24,14 +24,19 @@ namespace boost {
|
||||
|
||||
namespace detail{
|
||||
|
||||
#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238)
|
||||
#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238) && !defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)
|
||||
|
||||
template <class T>
|
||||
struct is_unsigned_values
|
||||
{
|
||||
//
|
||||
// Note that we cannot use BOOST_STATIC_CONSTANT here, using enum's
|
||||
// rather than "real" static constants simply doesn't work or give
|
||||
// the correct answer.
|
||||
//
|
||||
typedef typename remove_cv<T>::type no_cv_t;
|
||||
BOOST_STATIC_CONSTANT(no_cv_t, minus_one = (static_cast<no_cv_t>(-1)));
|
||||
BOOST_STATIC_CONSTANT(no_cv_t, zero = (static_cast<no_cv_t>(0)));
|
||||
static const no_cv_t minus_one = (static_cast<no_cv_t>(-1));
|
||||
static const no_cv_t zero = (static_cast<no_cv_t>(0));
|
||||
};
|
||||
|
||||
template <class T>
|
||||
|
Reference in New Issue
Block a user