forked from boostorg/type_traits
Fix msvc and gcc warnings in the type_traits library.
Build should now be clean with cl /W4 or gcc -Wall -Wextra -pedantic for all except one test - there appears to be no way to use initialized aligned_storage with gcc without it producing a warning :-( [SVN r57489]
This commit is contained in:
1 parent
524cb0cfe7
commit
c8d4c6ccd1
4 files changed
+26
-3
No files matched your search
@@ -26,11 +26,19 @@ namespace detail{
|
||||
|
||||
#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238)
|
||||
|
||||
template <class T>
|
||||
struct is_signed_values
|
||||
{
|
||||
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)));
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_signed_helper
|
||||
{
|
||||
typedef typename remove_cv<T>::type no_cv_t;
|
||||
BOOST_STATIC_CONSTANT(bool, value = (!(static_cast<no_cv_t>(-1) > 0)));
|
||||
BOOST_STATIC_CONSTANT(bool, value = (!(::boost::detail::is_signed_values<T>::minus_one > boost::detail::is_signed_values<T>::zero)));
|
||||
};
|
||||
|
||||
template <bool integral_type>
|
||||
|
||||
@@ -27,10 +27,17 @@ namespace detail{
|
||||
#if !(defined(__EDG_VERSION__) && __EDG_VERSION__ <= 238)
|
||||
|
||||
template <class T>
|
||||
struct is_ununsigned_helper
|
||||
struct is_unsigned_values
|
||||
{
|
||||
typedef typename remove_cv<T>::type no_cv_t;
|
||||
BOOST_STATIC_CONSTANT(bool, value = (static_cast<no_cv_t>(-1) > 0));
|
||||
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)));
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct is_ununsigned_helper
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value = (::boost::detail::is_unsigned_values<T>::minus_one > ::boost::detail::is_unsigned_values<T>::zero));
|
||||
};
|
||||
|
||||
template <bool integral_type>
|
||||
|
||||
Reference in new issue
Block a user