mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-20 16:12:10 +02:00
Cleaned up redundant test is_integral<T> || is_same<T,char> -> is_integral<T>
[SVN r9059]
This commit is contained in:
@ -47,6 +47,7 @@
|
|||||||
# include <boost/iterator_adaptors.hpp>
|
# include <boost/iterator_adaptors.hpp>
|
||||||
# include <boost/type_traits.hpp>
|
# include <boost/type_traits.hpp>
|
||||||
# include <boost/detail/numeric_traits.hpp>
|
# include <boost/detail/numeric_traits.hpp>
|
||||||
|
# include <boost/static_assert.hpp>
|
||||||
# ifndef BOOST_NO_LIMITS
|
# ifndef BOOST_NO_LIMITS
|
||||||
# include <limits>
|
# include <limits>
|
||||||
# endif
|
# endif
|
||||||
@ -123,11 +124,13 @@ namespace detail {
|
|||||||
// limitations of the compiler and library.
|
// limitations of the compiler and library.
|
||||||
template <class T>
|
template <class T>
|
||||||
struct is_numeric {
|
struct is_numeric {
|
||||||
|
// For a while, this wasn't true, but we rely on it below. This is a regression assert.
|
||||||
|
BOOST_STATIC_ASSERT(::boost::is_integral<char>::value);
|
||||||
enum { value =
|
enum { value =
|
||||||
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||||
std::numeric_limits<T>::is_specialized
|
std::numeric_limits<T>::is_specialized
|
||||||
#elif defined(__BORLANDC__)
|
#elif defined(__BORLANDC__)
|
||||||
::boost::is_integral<T>::value || ::boost::is_same<T,char>::value
|
::boost::is_integral<T>::value
|
||||||
#else
|
#else
|
||||||
boost::is_convertible<int,T>::value && boost::is_convertible<T,int>::value
|
boost::is_convertible<int,T>::value && boost::is_convertible<T,int>::value
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user