forked from boostorg/iterator
Rolled in supposed Borland fixes from John Maddock, but not seeing any improvement yet
[SVN r9093]
This commit is contained in:
@ -28,6 +28,8 @@
|
|||||||
// Incrementable.
|
// Incrementable.
|
||||||
//
|
//
|
||||||
// Revision History
|
// Revision History
|
||||||
|
// 10 Feb 2001 Rolled in supposed Borland fixes from John Maddock, but not
|
||||||
|
// seeing any improvement yet
|
||||||
// 09 Feb 2001 Factored out is_numeric computation. Borland still
|
// 09 Feb 2001 Factored out is_numeric computation. Borland still
|
||||||
// unhappy :( (David Abrahams)
|
// unhappy :( (David Abrahams)
|
||||||
// 08 Feb 2001 Beginning of a failed attempt to appease Borland
|
// 08 Feb 2001 Beginning of a failed attempt to appease Borland
|
||||||
@ -60,11 +62,14 @@ namespace detail {
|
|||||||
// iterator_category and difference_type for a counting_iterator at
|
// iterator_category and difference_type for a counting_iterator at
|
||||||
// compile-time based on whether or not it wraps an integer or an iterator,
|
// compile-time based on whether or not it wraps an integer or an iterator,
|
||||||
// using "poor man's partial specialization".
|
// using "poor man's partial specialization".
|
||||||
template <bool is_integer> struct counting_iterator_traits_select;
|
template <bool is_integer> struct counting_iterator_traits_select
|
||||||
|
|
||||||
|
#ifndef __BORLANDC__
|
||||||
|
;
|
||||||
// Incrementable is an iterator type
|
// Incrementable is an iterator type
|
||||||
template <>
|
template <>
|
||||||
struct counting_iterator_traits_select<false>
|
struct counting_iterator_traits_select<false>
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
template <class Incrementable>
|
template <class Incrementable>
|
||||||
struct traits
|
struct traits
|
||||||
@ -96,11 +101,13 @@ namespace detail {
|
|||||||
// the iterator wraps an integer or an iterator, using "poor man's partial
|
// the iterator wraps an integer or an iterator, using "poor man's partial
|
||||||
// specialization".
|
// specialization".
|
||||||
|
|
||||||
template <bool is_integer> struct distance_policy_select;
|
template <bool is_integer> struct distance_policy_select
|
||||||
|
#ifndef __BORLANDC__
|
||||||
|
;
|
||||||
// A policy for wrapped iterators
|
// A policy for wrapped iterators
|
||||||
template <>
|
template <>
|
||||||
struct distance_policy_select<false>
|
struct distance_policy_select<false>
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
template <class Distance, class Incrementable>
|
template <class Distance, class Incrementable>
|
||||||
struct policy {
|
struct policy {
|
||||||
@ -130,7 +137,7 @@ namespace detail {
|
|||||||
#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_arithmetic<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