mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-22 00:52:08 +02:00
Beginning of a failed attempt to appease Borland
[SVN r9041]
This commit is contained in:
@ -28,6 +28,8 @@
|
|||||||
// Incrementable.
|
// Incrementable.
|
||||||
//
|
//
|
||||||
// Revision History
|
// Revision History
|
||||||
|
// 08 Feb 2001 Beginning of a failed attempt to appease Borland
|
||||||
|
// (David Abrahams)
|
||||||
// 07 Feb 2001 rename counting_iterator() -> make_counting_iterator()
|
// 07 Feb 2001 rename counting_iterator() -> make_counting_iterator()
|
||||||
// (David Abrahams)
|
// (David Abrahams)
|
||||||
// 04 Feb 2001 Added counting_iterator_generator; updated comments
|
// 04 Feb 2001 Added counting_iterator_generator; updated comments
|
||||||
@ -136,16 +138,19 @@ namespace detail {
|
|||||||
template <class Incrementable>
|
template <class Incrementable>
|
||||||
struct counting_iterator_traits {
|
struct counting_iterator_traits {
|
||||||
private:
|
private:
|
||||||
typedef typename detail::counting_iterator_traits_select<(
|
enum {
|
||||||
|
is_numeric =
|
||||||
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
||||||
std::numeric_limits<Incrementable>::is_specialized
|
std::numeric_limits<Incrementable>::is_specialized
|
||||||
#else
|
#else
|
||||||
// Causes warnings with GCC, but how else can I detect numeric types at
|
// Try to detect numeric types at compile time
|
||||||
// compile-time?
|
boost::is_convertible<int,Incrementable>::value
|
||||||
(boost::is_convertible<int,Incrementable>::value &&
|
&& boost::is_convertible<Incrementable,int>::value
|
||||||
boost::is_convertible<Incrementable,int>::value)
|
|
||||||
#endif
|
#endif
|
||||||
)>::template traits<Incrementable> traits;
|
};
|
||||||
|
|
||||||
|
typedef typename detail::counting_iterator_traits_select<
|
||||||
|
is_numeric>::template traits<Incrementable> traits;
|
||||||
public:
|
public:
|
||||||
typedef Incrementable value_type;
|
typedef Incrementable value_type;
|
||||||
typedef const Incrementable& reference;
|
typedef const Incrementable& reference;
|
||||||
|
Reference in New Issue
Block a user