forked from boostorg/iterator
Compare commits
60 Commits
svn-branch
...
svn-branch
Author | SHA1 | Date | |
---|---|---|---|
986855db16 | |||
48f7be7015 | |||
bbef2422ad | |||
ae45f7abf7 | |||
6363297754 | |||
55fd9078a1 | |||
e22bb495db | |||
54ae365c98 | |||
a9483b5633 | |||
65fe75e558 | |||
7a43350655 | |||
df49ae74e0 | |||
3fe9b7517e | |||
ab372a0a74 | |||
f9c4915b55 | |||
741da59c0d | |||
a0b28e4c8b | |||
ef895f0cc7 | |||
1d018cc602 | |||
88697aad65 | |||
7344357e32 | |||
80501e1eb2 | |||
7707262a07 | |||
ba3e7a459e | |||
295ae05e40 | |||
68268f81eb | |||
3b60f75bc6 | |||
a8f528130a | |||
c0788f2cd8 | |||
c6bc3b2547 | |||
27adbbb6ed | |||
1f999864a1 | |||
65af4c96a9 | |||
aa9e49b727 | |||
3318c82f83 | |||
68791c337a | |||
a396085bc0 | |||
6196a6e591 | |||
4e07575b78 | |||
557ef60557 | |||
4b583d3aa0 | |||
3eca5e8f60 | |||
5947d569b9 | |||
e469abbf57 | |||
c141f6cc59 | |||
55f8a6380a | |||
9c955e8af2 | |||
82108581b9 | |||
c4834d363e | |||
7194aff64c | |||
ca41a4f902 | |||
47a3392c80 | |||
bd765a21fb | |||
cad110e0f3 | |||
3599398eca | |||
dd72d599c8 | |||
1a9677d9dc | |||
a6d200f262 | |||
0c28649d0b | |||
d6405ddd54 |
@ -1,8 +1,7 @@
|
||||
// (C) Copyright Jeremy Siek 2001. Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// (C) Copyright Jeremy Siek 2001.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// Revision History:
|
||||
|
||||
|
@ -1,426 +0,0 @@
|
||||
// (C) Copyright Jeremy Siek and David Abrahams 2000-2001. Permission to copy,
|
||||
// use, modify, sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided "as is"
|
||||
// without express or implied warranty, and with no claim as to its suitability
|
||||
// for any purpose.
|
||||
//
|
||||
// Revision History:
|
||||
// 11 Feb 2001 Use new iterator_adaptor interface, Fixes for Borland.
|
||||
// (Dave Abrahams)
|
||||
// 04 Feb 2001 Support for user-defined iterator categories (Dave Abrahams)
|
||||
// 30 Jan 2001 Initial Checkin (Dave Abrahams)
|
||||
|
||||
#ifndef BOOST_HALF_OPEN_RANGE_HPP_
|
||||
# define BOOST_HALF_OPEN_RANGE_HPP_
|
||||
|
||||
# include <boost/counting_iterator.hpp>
|
||||
# include <functional>
|
||||
# include <cassert>
|
||||
# include <boost/operators.hpp>
|
||||
# include <string>
|
||||
# include <stdexcept>
|
||||
# include <iterator>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace detail {
|
||||
|
||||
// Template class choose_finish -- allows us to maintain the invariant that
|
||||
// start() <= finish() on half_open_range specializations that support random
|
||||
// access.
|
||||
#ifdef __MWERKS__
|
||||
template <class T>
|
||||
const T& choose_finish(const T&, const T& finish, std::input_iterator_tag)
|
||||
{
|
||||
return finish;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
const T& choose_finish(const T&, const T& finish, std::output_iterator_tag)
|
||||
{
|
||||
return finish;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
const T& choose_finish(const T& start, const T& finish, std::random_access_iterator_tag)
|
||||
{
|
||||
return finish < start ? start : finish;
|
||||
}
|
||||
#else
|
||||
template <bool is_random_access> struct finish_chooser;
|
||||
|
||||
template <>
|
||||
struct finish_chooser<false>
|
||||
{
|
||||
template <class T>
|
||||
struct rebind
|
||||
{
|
||||
static T choose(const T&, const T& finish)
|
||||
{ return finish; }
|
||||
};
|
||||
};
|
||||
|
||||
template <>
|
||||
struct finish_chooser<true>
|
||||
{
|
||||
template <class T>
|
||||
struct rebind
|
||||
{
|
||||
static T choose(const T& start, const T& finish)
|
||||
{ return finish < start ? start : finish; }
|
||||
};
|
||||
};
|
||||
|
||||
template <class Category, class Incrementable>
|
||||
struct choose_finish
|
||||
{
|
||||
static const Incrementable choose(const Incrementable& start, const Incrementable& finish)
|
||||
{
|
||||
return finish_chooser<(
|
||||
::boost::is_convertible<Category*,std::random_access_iterator_tag*>::value
|
||||
)>::template rebind<Incrementable>::choose(start, finish);
|
||||
}
|
||||
};
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
struct half_open_range
|
||||
{
|
||||
typedef typename counting_iterator_generator<Incrementable>::type iterator;
|
||||
|
||||
private: // utility type definitions
|
||||
// Using iter_t prevents compiler confusion with boost::iterator
|
||||
typedef typename counting_iterator_generator<Incrementable>::type iter_t;
|
||||
|
||||
typedef std::less<Incrementable> less_value;
|
||||
typedef typename iter_t::iterator_category category;
|
||||
typedef half_open_range<Incrementable> self;
|
||||
|
||||
public:
|
||||
typedef iter_t const_iterator;
|
||||
typedef typename iterator::value_type value_type;
|
||||
typedef typename iterator::difference_type difference_type;
|
||||
typedef typename iterator::reference reference;
|
||||
typedef typename iterator::reference const_reference;
|
||||
typedef typename iterator::pointer pointer;
|
||||
typedef typename iterator::pointer const_pointer;
|
||||
|
||||
// It would be nice to select an unsigned type, but this is appropriate
|
||||
// since the library makes an attempt to select a difference_type which can
|
||||
// hold the difference between any two iterators.
|
||||
typedef typename iterator::difference_type size_type;
|
||||
|
||||
half_open_range(Incrementable start, Incrementable finish)
|
||||
: m_start(start),
|
||||
m_finish(
|
||||
#ifndef __MWERKS__
|
||||
detail::choose_finish<category,Incrementable>::choose(start, finish)
|
||||
#else
|
||||
detail::choose_finish(start, finish, category())
|
||||
#endif
|
||||
)
|
||||
{}
|
||||
|
||||
// Implicit conversion from std::pair<Incrementable,Incrementable> allows us
|
||||
// to accept the results of std::equal_range(), for example.
|
||||
half_open_range(const std::pair<Incrementable,Incrementable>& x)
|
||||
: m_start(x.first),
|
||||
m_finish(
|
||||
#ifndef __MWERKS__
|
||||
detail::choose_finish<category,Incrementable>::choose(x.first, x.second)
|
||||
#else
|
||||
detail::choose_finish(x.first, x.second, category())
|
||||
#endif
|
||||
)
|
||||
{}
|
||||
|
||||
half_open_range& operator=(const self& x)
|
||||
{
|
||||
m_start = x.m_start;
|
||||
m_finish = x.m_finish;
|
||||
return *this;
|
||||
}
|
||||
|
||||
half_open_range& operator=(const std::pair<Incrementable,Incrementable>& x)
|
||||
{
|
||||
m_start = x.first;
|
||||
m_finish =
|
||||
#ifndef __MWERKS__
|
||||
detail::choose_finish<category,Incrementable>::choose(x.first, x.second);
|
||||
#else
|
||||
detail::choose_finish(x.first, x.second, category();
|
||||
#endif
|
||||
}
|
||||
|
||||
iterator begin() const { return iterator(m_start); }
|
||||
iterator end() const { return iterator(m_finish); }
|
||||
|
||||
Incrementable front() const { assert(!this->empty()); return m_start; }
|
||||
Incrementable back() const { assert(!this->empty()); return boost::prior(m_finish); }
|
||||
|
||||
Incrementable start() const { return m_start; }
|
||||
Incrementable finish() const { return m_finish; }
|
||||
|
||||
size_type size() const { return boost::detail::distance(begin(), end()); }
|
||||
|
||||
bool empty() const
|
||||
{
|
||||
return m_finish == m_start;
|
||||
}
|
||||
|
||||
void swap(half_open_range& x) {
|
||||
std::swap(m_start, x.m_start);
|
||||
std::swap(m_finish, x.m_finish);
|
||||
}
|
||||
|
||||
public: // functions requiring random access elements
|
||||
|
||||
// REQUIRES: x is reachable from this->front()
|
||||
bool contains(const value_type& x) const
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
|
||||
return !less_value()(x, m_start) && less_value()(x, m_finish);
|
||||
}
|
||||
|
||||
bool contains(const half_open_range& x) const
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
|
||||
return x.empty() || !less_value()(x.m_start, m_start) && !less_value()(m_finish, x.m_finish);
|
||||
}
|
||||
|
||||
bool intersects(const half_open_range& x) const
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
|
||||
return less_value()(
|
||||
less_value()(this->m_start, x.m_start) ? x.m_start : this->m_start,
|
||||
less_value()(this->m_finish, x.m_finish) ? this->m_finish : x.m_finish);
|
||||
}
|
||||
|
||||
half_open_range& operator&=(const half_open_range& x)
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
|
||||
|
||||
if (less_value()(this->m_start, x.m_start))
|
||||
this->m_start = x.m_start;
|
||||
|
||||
if (less_value()(x.m_finish, this->m_finish))
|
||||
this->m_finish = x.m_finish;
|
||||
|
||||
if (less_value()(this->m_finish, this->m_start))
|
||||
this->m_start = this->m_finish;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
half_open_range& operator|=(const half_open_range& x)
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
|
||||
|
||||
if (!x.empty())
|
||||
{
|
||||
if (this->empty())
|
||||
{
|
||||
*this = x;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (less_value()(x.m_start, this->m_start))
|
||||
this->m_start = x.m_start;
|
||||
|
||||
if (less_value()(this->m_finish, x.m_finish))
|
||||
this->m_finish = x.m_finish;
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
// REQUIRES: x is reachable from this->front()
|
||||
const_iterator find(const value_type& x) const
|
||||
{
|
||||
BOOST_STATIC_ASSERT((boost::is_same<category, std::random_access_iterator_tag>::value));
|
||||
|
||||
return const_iterator(this->contains(x) ? x : m_finish);
|
||||
}
|
||||
|
||||
// REQUIRES: index >= 0 && index < size()
|
||||
value_type operator[](size_type index) const
|
||||
{
|
||||
assert(index >= 0 && index < size());
|
||||
return m_start + index;
|
||||
}
|
||||
|
||||
value_type at(size_type index) const
|
||||
{
|
||||
if (index < 0 || index >= size())
|
||||
throw std::out_of_range(std::string("half_open_range"));
|
||||
return m_start + index;
|
||||
}
|
||||
|
||||
private: // data members
|
||||
Incrementable m_start, m_finish;
|
||||
};
|
||||
|
||||
template <class Incrementable>
|
||||
half_open_range<Incrementable> operator|(
|
||||
half_open_range<Incrementable> x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return x |= y;
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
half_open_range<Incrementable> operator&(
|
||||
half_open_range<Incrementable> x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return x &= y;
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
inline bool operator==(
|
||||
const half_open_range<Incrementable>& x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
const bool y_empty = y.empty();
|
||||
return x.empty() ? y_empty : !y_empty && x.start() == y.start() && x.finish() == y.finish();
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
inline bool operator!=(
|
||||
const half_open_range<Incrementable>& x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return !(x == y);
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
inline half_open_range<Incrementable>
|
||||
make_half_open_range(Incrementable first, Incrementable last)
|
||||
{
|
||||
return half_open_range<Incrementable>(first, last);
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
bool intersects(
|
||||
const half_open_range<Incrementable>& x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return x.intersects(y);
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
bool contains(
|
||||
const half_open_range<Incrementable>& x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return x.contains(y);
|
||||
}
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
namespace std {
|
||||
template <class Incrementable> struct less<boost::half_open_range<Incrementable> >
|
||||
: binary_function<
|
||||
boost::half_open_range<Incrementable>,
|
||||
boost::half_open_range<Incrementable>,bool>
|
||||
{
|
||||
bool operator()(
|
||||
const boost::half_open_range<Incrementable>& x,
|
||||
const boost::half_open_range<Incrementable>& y) const
|
||||
{
|
||||
less<Incrementable> cmp;
|
||||
return !y.empty() && (
|
||||
cmp(x.start(), y.start())
|
||||
|| !cmp(y.start(), x.start())
|
||||
&& cmp(x.finish(), y.finish()));
|
||||
}
|
||||
};
|
||||
|
||||
template <class Incrementable> struct less_equal<boost::half_open_range<Incrementable> >
|
||||
: binary_function<
|
||||
boost::half_open_range<Incrementable>,
|
||||
boost::half_open_range<Incrementable>,bool>
|
||||
{
|
||||
bool operator()(
|
||||
const boost::half_open_range<Incrementable>& x,
|
||||
const boost::half_open_range<Incrementable>& y) const
|
||||
{
|
||||
typedef boost::half_open_range<Incrementable> range;
|
||||
less<range> cmp;
|
||||
return !cmp(y,x);
|
||||
}
|
||||
};
|
||||
template <class Incrementable> struct greater<boost::half_open_range<Incrementable> >
|
||||
: binary_function<
|
||||
boost::half_open_range<Incrementable>,
|
||||
boost::half_open_range<Incrementable>,bool>
|
||||
{
|
||||
bool operator()(
|
||||
const boost::half_open_range<Incrementable>& x,
|
||||
const boost::half_open_range<Incrementable>& y) const
|
||||
{
|
||||
typedef boost::half_open_range<Incrementable> range;
|
||||
less<range> cmp;
|
||||
return cmp(y,x);
|
||||
}
|
||||
};
|
||||
|
||||
template <class Incrementable> struct greater_equal<boost::half_open_range<Incrementable> >
|
||||
: binary_function<
|
||||
boost::half_open_range<Incrementable>,
|
||||
boost::half_open_range<Incrementable>,bool>
|
||||
{
|
||||
bool operator()(
|
||||
const boost::half_open_range<Incrementable>& x,
|
||||
const boost::half_open_range<Incrementable>& y) const
|
||||
{
|
||||
typedef boost::half_open_range<Incrementable> range;
|
||||
less<range> cmp;
|
||||
return !cmp(x,y);
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
#else
|
||||
|
||||
namespace boost {
|
||||
// Can't partially specialize std::less et al, so we must provide the operators
|
||||
template <class Incrementable>
|
||||
bool operator<(const half_open_range<Incrementable>& x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return !y.empty() && (
|
||||
x.empty() || std::less<Incrementable>()(x.start(), y.start())
|
||||
|| !std::less<Incrementable>()(y.start(), x.start())
|
||||
&& std::less<Incrementable>()(x.finish(), y.finish()));
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
bool operator>(const half_open_range<Incrementable>& x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return y < x;
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
bool operator<=(const half_open_range<Incrementable>& x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return !(y < x);
|
||||
}
|
||||
|
||||
template <class Incrementable>
|
||||
bool operator>=(const half_open_range<Incrementable>& x,
|
||||
const half_open_range<Incrementable>& y)
|
||||
{
|
||||
return !(x < y);
|
||||
}
|
||||
} // namespace boost
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // BOOST_HALF_OPEN_RANGE_HPP_
|
@ -1,9 +1,8 @@
|
||||
// interator.hpp workarounds for non-conforming standard libraries ---------//
|
||||
|
||||
// (C) Copyright Boost.org 2000. Permission to copy, use, modify, sell and
|
||||
// distribute this software is granted provided this copyright notice appears
|
||||
// in all copies. This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
// (C) Copyright Beman Dawes 2000. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org/libs/utility for documentation.
|
||||
|
||||
@ -53,7 +52,7 @@ namespace boost
|
||||
|
||||
template <class Category, class T, class Distance = std::ptrdiff_t,
|
||||
class Pointer = T*, class Reference = T&>
|
||||
struct iterator : detail::iterator_base<Category, T, Distance, Pointer, Reference> {};
|
||||
struct iterator : boost::detail::iterator_base<Category, T, Distance, Pointer, Reference> {};
|
||||
# endif
|
||||
} // namespace boost
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
// Copyright David Abrahams 2003. Permission to copy, use,
|
||||
// modify, sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Copyright David Abrahams 2003.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef COUNTING_ITERATOR_DWA200348_HPP
|
||||
# define COUNTING_ITERATOR_DWA200348_HPP
|
||||
|
||||
@ -11,7 +10,7 @@
|
||||
# include <boost/mpl/bool.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/identity.hpp>
|
||||
# include <boost/mpl/apply_if.hpp>
|
||||
# include <boost/mpl/eval_if.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
@ -58,11 +57,11 @@ namespace detail
|
||||
|
||||
# if defined(BOOST_HAS_LONG_LONG)
|
||||
template <>
|
||||
struct is_numeric<long long>
|
||||
struct is_numeric< ::boost::long_long_type>
|
||||
: mpl::true_ {};
|
||||
|
||||
template <>
|
||||
struct is_numeric<unsigned long long>
|
||||
struct is_numeric< ::boost::ulong_long_type>
|
||||
: mpl::true_ {};
|
||||
# endif
|
||||
|
||||
@ -84,7 +83,7 @@ namespace detail
|
||||
{
|
||||
typedef typename detail::ia_dflt_help<
|
||||
CategoryOrTraversal
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_numeric<Incrementable>
|
||||
, mpl::identity<random_access_traversal_tag>
|
||||
, iterator_traversal<Incrementable>
|
||||
@ -93,7 +92,7 @@ namespace detail
|
||||
|
||||
typedef typename detail::ia_dflt_help<
|
||||
Difference
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_numeric<Incrementable>
|
||||
, numeric_difference<Incrementable>
|
||||
, iterator_difference<Incrementable>
|
||||
|
@ -1 +0,0 @@
|
||||
#error obsolete
|
@ -1,11 +1,9 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// no include guard multiple inclusion intended
|
||||
|
||||
@ -24,7 +22,11 @@
|
||||
# define BOOST_ITERATOR_CONFIG_DEF
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
// We enable this always now. Otherwise, the simple case in
|
||||
// libs/iterator/test/constant_iterator_arrow.cpp fails to compile
|
||||
// because the operator-> return is improperly deduced as a non-const
|
||||
// pointer.
|
||||
#if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531))
|
||||
|
||||
// Recall that in general, compilers without partial specialization
|
||||
@ -38,7 +40,7 @@
|
||||
// end up using a proxy for operator[] when we otherwise shouldn't.
|
||||
// Using reference constness gives it an extra hint that it can
|
||||
// return the value_type from operator[] directly, but is not
|
||||
// strictly neccessary. Not sure how best to resolve this one.
|
||||
// strictly necessary. Not sure how best to resolve this one.
|
||||
|
||||
# define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1
|
||||
|
||||
@ -46,7 +48,8 @@
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
||||
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) \
|
||||
|| (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER))
|
||||
|| (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \
|
||||
|| BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
|
||||
# define BOOST_NO_LVALUE_RETURN_DETECTION
|
||||
|
||||
# if 0 // test code
|
||||
@ -112,7 +115,7 @@
|
||||
# define BOOST_ITERATOR_NO_MPL_AUX_HAS_XXX // "MPL's has_xxx facility doesn't work"
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE)
|
||||
#if !defined(BOOST_MSVC) && (defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE))
|
||||
# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
|
||||
#endif
|
||||
|
||||
|
@ -1,9 +1,7 @@
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// no include guard multiple inclusion intended
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_ENABLE_IF_23022003THW_HPP
|
||||
#define BOOST_ENABLE_IF_23022003THW_HPP
|
||||
|
||||
@ -74,7 +72,7 @@ namespace boost
|
||||
: mpl::identity<Return>
|
||||
# endif
|
||||
{
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
typedef Return type;
|
||||
# endif
|
||||
};
|
||||
|
@ -11,7 +11,7 @@
|
||||
# include <boost/mpl/or.hpp> // used in iterator_tag inheritance logic
|
||||
# include <boost/mpl/and.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/apply_if.hpp>
|
||||
# include <boost/mpl/eval_if.hpp>
|
||||
# include <boost/mpl/identity.hpp>
|
||||
|
||||
# include <boost/type_traits/is_same.hpp>
|
||||
@ -24,7 +24,7 @@
|
||||
# include <boost/iterator/detail/config_def.hpp> // try to keep this last
|
||||
|
||||
# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
|
||||
# include <boost/python/detail/indirect_traits.hpp>
|
||||
# include <boost/detail/indirect_traits.hpp>
|
||||
# endif
|
||||
|
||||
//
|
||||
@ -61,7 +61,7 @@ struct iterator_writability_disabled
|
||||
# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY // Adding Thomas' logic?
|
||||
: mpl::or_<
|
||||
is_const<Reference>
|
||||
, python::detail::is_reference_to_const<Reference>
|
||||
, boost::detail::indirect_traits::is_reference_to_const<Reference>
|
||||
, is_const<ValueParam>
|
||||
>
|
||||
# else
|
||||
@ -86,12 +86,12 @@ struct iterator_writability_disabled
|
||||
//
|
||||
template <class Traversal, class ValueParam, class Reference>
|
||||
struct iterator_facade_default_category
|
||||
: mpl::apply_if<
|
||||
: mpl::eval_if<
|
||||
mpl::and_<
|
||||
is_reference<Reference>
|
||||
, is_convertible<Traversal,forward_traversal_tag>
|
||||
>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Traversal,random_access_traversal_tag>
|
||||
, mpl::identity<std::random_access_iterator_tag>
|
||||
, mpl::if_<
|
||||
@ -100,7 +100,7 @@ struct iterator_facade_default_category
|
||||
, std::forward_iterator_tag
|
||||
>
|
||||
>
|
||||
, typename mpl::apply_if<
|
||||
, typename mpl::eval_if<
|
||||
mpl::and_<
|
||||
is_convertible<Traversal, single_pass_traversal_tag>
|
||||
|
||||
@ -194,7 +194,7 @@ struct facade_iterator_category_impl
|
||||
//
|
||||
template <class CategoryOrTraversal, class ValueParam, class Reference>
|
||||
struct facade_iterator_category
|
||||
: mpl::apply_if<
|
||||
: mpl::eval_if<
|
||||
is_iterator_category<CategoryOrTraversal>
|
||||
, mpl::identity<CategoryOrTraversal> // old-style categories are fine as-is
|
||||
, facade_iterator_category_impl<CategoryOrTraversal,ValueParam,Reference>
|
||||
|
@ -22,8 +22,12 @@ namespace boost { namespace detail {
|
||||
//
|
||||
template <bool GreaterEqual, bool LessEqual>
|
||||
struct minimum_category_impl
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
{
|
||||
template <class T1, class T2> struct apply
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
typedef void type;
|
||||
}
|
||||
# endif
|
||||
@ -73,16 +77,16 @@ template <class T1 = mpl::_1, class T2 = mpl::_2>
|
||||
struct minimum_category
|
||||
{
|
||||
typedef minimum_category_impl<
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200) // ETI workaround
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround
|
||||
is_same<T2,int>::value ||
|
||||
# endif
|
||||
::boost::is_convertible<T1,T2>::value
|
||||
, ::boost::is_convertible<T2,T1>::value
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200) // ETI workaround
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround
|
||||
|| is_same<T1,int>::value
|
||||
# endif
|
||||
> outer;
|
||||
|
||||
|
||||
typedef typename outer::template apply<T1,T2> inner;
|
||||
typedef typename inner::type type;
|
||||
|
||||
@ -95,16 +99,18 @@ struct minimum_category<mpl::_1,mpl::_2>
|
||||
template <class T1, class T2>
|
||||
struct apply : minimum_category<T1,T2>
|
||||
{};
|
||||
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,minimum_category,(mpl::_1,mpl::_2))
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200) // ETI workaround
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround
|
||||
template <>
|
||||
struct minimum_category<int,int>
|
||||
{
|
||||
typedef int type;
|
||||
};
|
||||
# endif
|
||||
|
||||
|
||||
}} // namespace boost::detail
|
||||
|
||||
#endif // MINIMUM_CATEGORY_DWA20031119_HPP
|
||||
|
@ -1,11 +1,9 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_FILTER_ITERATOR_23022003THW_HPP
|
||||
#define BOOST_FILTER_ITERATOR_23022003THW_HPP
|
||||
|
||||
@ -33,9 +31,9 @@ namespace boost
|
||||
, typename mpl::if_<
|
||||
is_convertible<
|
||||
typename iterator_traversal<Iterator>::type
|
||||
, bidirectional_traversal_tag
|
||||
, random_access_traversal_tag
|
||||
>
|
||||
, forward_traversal_tag
|
||||
, bidirectional_traversal_tag
|
||||
, use_default
|
||||
>::type
|
||||
> type;
|
||||
@ -124,7 +122,7 @@ namespace boost
|
||||
, Iterator
|
||||
>::type x
|
||||
, Iterator end = Iterator()
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
, Predicate* = 0
|
||||
#endif
|
||||
)
|
||||
|
@ -1,11 +1,9 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_INDIRECT_ITERATOR_23022003THW_HPP
|
||||
#define BOOST_INDIRECT_ITERATOR_23022003THW_HPP
|
||||
|
||||
@ -16,18 +14,18 @@
|
||||
#include <boost/indirect_reference.hpp>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
|
||||
#include <boost/python/detail/indirect_traits.hpp>
|
||||
#include <boost/detail/indirect_traits.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/add_reference.hpp>
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
#include <boost/mpl/apply_if.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/not.hpp>
|
||||
#include <boost/mpl/aux_/has_xxx.hpp>
|
||||
#include <boost/mpl/has_xxx.hpp>
|
||||
|
||||
#ifdef BOOST_MPL_NO_AUX_HAS_XXX
|
||||
#ifdef BOOST_MPL_CFG_NO_HAS_XXX
|
||||
# include <boost/shared_ptr.hpp>
|
||||
# include <boost/scoped_ptr.hpp>
|
||||
# include <boost/mpl/bool.hpp>
|
||||
@ -57,7 +55,7 @@ namespace boost
|
||||
, Category
|
||||
, typename ia_dflt_help<
|
||||
Reference
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_same<Value,use_default>
|
||||
, indirect_reference<dereferenceable>
|
||||
, add_reference<Value>
|
||||
|
@ -1,11 +1,9 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_INTEROPERABLE_23022003THW_HPP
|
||||
# define BOOST_INTEROPERABLE_23022003THW_HPP
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
|
||||
#define BOOST_ITERATOR_ADAPTOR_23022003THW_HPP
|
||||
|
||||
@ -102,7 +100,22 @@ namespace boost
|
||||
// false positives for user/library defined iterator types. See comments
|
||||
// on operator implementation for consequences.
|
||||
//
|
||||
# if defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
|
||||
template<typename From, typename To>
|
||||
struct enable_if_convertible
|
||||
{
|
||||
typedef typename mpl::if_<
|
||||
mpl::or_<
|
||||
is_same<From,To>
|
||||
, is_convertible<From, To>
|
||||
>
|
||||
, detail::enable_type
|
||||
, int&
|
||||
>::type type;
|
||||
};
|
||||
|
||||
# elif defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_SFINAE)
|
||||
|
||||
template <class From, class To>
|
||||
struct enable_if_convertible
|
||||
@ -146,7 +159,7 @@ namespace boost
|
||||
// DefaultNullaryFn, otherwise return T.
|
||||
template <class T, class DefaultNullaryFn>
|
||||
struct ia_dflt_help
|
||||
: mpl::apply_if<
|
||||
: mpl::eval_if<
|
||||
is_same<T, use_default>
|
||||
, DefaultNullaryFn
|
||||
, mpl::identity<T>
|
||||
@ -172,7 +185,7 @@ namespace boost
|
||||
# ifdef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
|
||||
, typename detail::ia_dflt_help<
|
||||
Value
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_same<Reference,use_default>
|
||||
, iterator_value<Base>
|
||||
, remove_reference<Reference>
|
||||
@ -191,7 +204,7 @@ namespace boost
|
||||
|
||||
, typename detail::ia_dflt_help<
|
||||
Reference
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_same<Value,use_default>
|
||||
, iterator_reference<Base>
|
||||
, add_reference<Value>
|
||||
@ -204,7 +217,13 @@ namespace boost
|
||||
>
|
||||
type;
|
||||
};
|
||||
template <class T> int static_assert_convertible_to(T);
|
||||
|
||||
// workaround for aC++ CR JAGaf33512
|
||||
template <class Tr1, class Tr2>
|
||||
inline void iterator_adaptor_assert_traversal ()
|
||||
{
|
||||
BOOST_STATIC_ASSERT((is_convertible<Tr1, Tr2>::value));
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@ -259,6 +278,8 @@ namespace boost
|
||||
{
|
||||
}
|
||||
|
||||
typedef Base base_type;
|
||||
|
||||
Base const& base() const
|
||||
{ return m_iterator; }
|
||||
|
||||
@ -302,8 +323,7 @@ namespace boost
|
||||
>::type my_traversal;
|
||||
|
||||
# define BOOST_ITERATOR_ADAPTOR_ASSERT_TRAVERSAL(cat) \
|
||||
typedef int assertion[sizeof(detail::static_assert_convertible_to<cat>(my_traversal()))];
|
||||
// BOOST_STATIC_ASSERT((is_convertible<my_traversal,cat>::value));
|
||||
detail::iterator_adaptor_assert_traversal<my_traversal, cat>();
|
||||
|
||||
void advance(typename super_t::difference_type n)
|
||||
{
|
||||
|
@ -1,8 +1,7 @@
|
||||
// (C) Copyright Jeremy Siek 2002. Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_ITERATOR_ARCHETYPES_HPP
|
||||
#define BOOST_ITERATOR_ARCHETYPES_HPP
|
||||
@ -26,7 +25,7 @@
|
||||
#include <boost/mpl/int.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/apply_if.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/identity.hpp>
|
||||
|
||||
@ -121,9 +120,9 @@ namespace detail
|
||||
template <class Value, class AccessCategory, class TraversalCategory>
|
||||
struct operator_brackets
|
||||
: mpl::aux::msvc_eti_base<
|
||||
typename mpl::apply_if<
|
||||
typename mpl::eval_if<
|
||||
is_convertible<TraversalCategory, random_access_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
iterator_archetypes::has_access<
|
||||
AccessCategory
|
||||
, iterator_archetypes::writable_iterator_t
|
||||
@ -241,8 +240,7 @@ namespace detail
|
||||
{
|
||||
template<class Derived, class Value>
|
||||
struct archetype
|
||||
: public partially_ordered<traversal_archetype_<Derived, Value, random_access_traversal_tag> >,
|
||||
public traversal_archetype_<Derived, Value, bidirectional_traversal_tag>
|
||||
: public traversal_archetype_<Derived, Value, bidirectional_traversal_tag>
|
||||
{
|
||||
Derived& operator+=(std::ptrdiff_t) { return static_object<Derived>::get(); }
|
||||
Derived& operator-=(std::ptrdiff_t) { return static_object<Derived>::get(); }
|
||||
@ -273,6 +271,21 @@ namespace detail
|
||||
traversal_archetype_<Derived, Value, random_access_traversal_tag> const&)
|
||||
{ return true; }
|
||||
|
||||
template <class Derived, class Value>
|
||||
bool operator>(traversal_archetype_<Derived, Value, random_access_traversal_tag> const&,
|
||||
traversal_archetype_<Derived, Value, random_access_traversal_tag> const&)
|
||||
{ return true; }
|
||||
|
||||
template <class Derived, class Value>
|
||||
bool operator<=(traversal_archetype_<Derived, Value, random_access_traversal_tag> const&,
|
||||
traversal_archetype_<Derived, Value, random_access_traversal_tag> const&)
|
||||
{ return true; }
|
||||
|
||||
template <class Derived, class Value>
|
||||
bool operator>=(traversal_archetype_<Derived, Value, random_access_traversal_tag> const&,
|
||||
traversal_archetype_<Derived, Value, random_access_traversal_tag> const&)
|
||||
{ return true; }
|
||||
|
||||
struct bogus_type;
|
||||
|
||||
template <class Value>
|
||||
@ -418,7 +431,7 @@ namespace detail
|
||||
|
||||
typedef typename detail::facade_iterator_category<
|
||||
TraversalCategory
|
||||
, typename mpl::apply_if<
|
||||
, typename mpl::eval_if<
|
||||
iterator_archetypes::has_access<
|
||||
AccessCategory, iterator_archetypes::writable_iterator_t
|
||||
>
|
||||
|
@ -1,8 +1,7 @@
|
||||
// (C) Copyright Jeremy Siek 2002. Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_ITERATOR_CATEGORIES_HPP
|
||||
# define BOOST_ITERATOR_CATEGORIES_HPP
|
||||
@ -13,7 +12,7 @@
|
||||
|
||||
# include <boost/detail/workaround.hpp>
|
||||
|
||||
# include <boost/mpl/apply_if.hpp>
|
||||
# include <boost/mpl/eval_if.hpp>
|
||||
# include <boost/mpl/identity.hpp>
|
||||
# include <boost/mpl/placeholders.hpp>
|
||||
# include <boost/mpl/aux_/lambda_support.hpp>
|
||||
@ -75,19 +74,19 @@ namespace detail
|
||||
//
|
||||
template <class Cat>
|
||||
struct old_category_to_traversal
|
||||
: mpl::apply_if<
|
||||
: mpl::eval_if<
|
||||
is_convertible<Cat,std::random_access_iterator_tag>
|
||||
, mpl::identity<random_access_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Cat,std::bidirectional_iterator_tag>
|
||||
, mpl::identity<bidirectional_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Cat,std::forward_iterator_tag>
|
||||
, mpl::identity<forward_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Cat,std::input_iterator_tag>
|
||||
, mpl::identity<single_pass_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Cat,std::output_iterator_tag>
|
||||
, mpl::identity<incrementable_traversal_tag>
|
||||
, void
|
||||
@ -98,7 +97,7 @@ namespace detail
|
||||
>
|
||||
{};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <>
|
||||
struct old_category_to_traversal<int>
|
||||
{
|
||||
@ -108,19 +107,19 @@ namespace detail
|
||||
|
||||
template <class Traversal>
|
||||
struct pure_traversal_tag
|
||||
: mpl::apply_if<
|
||||
: mpl::eval_if<
|
||||
is_convertible<Traversal,random_access_traversal_tag>
|
||||
, mpl::identity<random_access_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Traversal,bidirectional_traversal_tag>
|
||||
, mpl::identity<bidirectional_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Traversal,forward_traversal_tag>
|
||||
, mpl::identity<forward_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Traversal,single_pass_traversal_tag>
|
||||
, mpl::identity<single_pass_traversal_tag>
|
||||
, mpl::apply_if<
|
||||
, mpl::eval_if<
|
||||
is_convertible<Traversal,incrementable_traversal_tag>
|
||||
, mpl::identity<incrementable_traversal_tag>
|
||||
, void
|
||||
@ -132,7 +131,7 @@ namespace detail
|
||||
{
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <>
|
||||
struct pure_traversal_tag<int>
|
||||
{
|
||||
@ -148,7 +147,7 @@ namespace detail
|
||||
//
|
||||
template <class Cat>
|
||||
struct iterator_category_to_traversal
|
||||
: mpl::apply_if< // if already convertible to a traversal tag, we're done.
|
||||
: mpl::eval_if< // if already convertible to a traversal tag, we're done.
|
||||
is_convertible<Cat,incrementable_traversal_tag>
|
||||
, mpl::identity<Cat>
|
||||
, detail::old_category_to_traversal<Cat>
|
||||
@ -163,7 +162,7 @@ struct iterator_traversal
|
||||
>
|
||||
{};
|
||||
|
||||
# ifdef BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
|
||||
# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
|
||||
// Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work
|
||||
// out well. Instantiating the nested apply template also
|
||||
// requires instantiating iterator_traits on the
|
||||
|
@ -1,8 +1,7 @@
|
||||
// (C) Copyright Jeremy Siek 2002. Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_ITERATOR_CONCEPTS_HPP
|
||||
#define BOOST_ITERATOR_CONCEPTS_HPP
|
||||
@ -32,6 +31,7 @@
|
||||
|
||||
// Use boost/limits to work around missing limits headers on some compilers
|
||||
#include <boost/limits.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -1,16 +1,12 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_ITERATOR_FACADE_23022003THW_HPP
|
||||
#define BOOST_ITERATOR_FACADE_23022003THW_HPP
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <boost/iterator.hpp>
|
||||
#include <boost/iterator/interoperable.hpp>
|
||||
#include <boost/iterator/iterator_traits.hpp>
|
||||
@ -18,6 +14,9 @@
|
||||
#include <boost/iterator/detail/facade_iterator_category.hpp>
|
||||
#include <boost/iterator/detail/enable_if.hpp>
|
||||
|
||||
#include <boost/implicit_cast.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/type_traits/add_const.hpp>
|
||||
#include <boost/type_traits/add_pointer.hpp>
|
||||
@ -26,7 +25,7 @@
|
||||
#include <boost/type_traits/is_convertible.hpp>
|
||||
#include <boost/type_traits/is_pod.hpp>
|
||||
|
||||
#include <boost/mpl/apply_if.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/if.hpp>
|
||||
#include <boost/mpl/or.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
@ -56,7 +55,7 @@ namespace boost
|
||||
typedef bool type;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
//
|
||||
// enable if for use in operator implementation.
|
||||
//
|
||||
@ -66,6 +65,18 @@ namespace boost
|
||||
, class Return
|
||||
>
|
||||
struct enable_if_interoperable
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
{
|
||||
typedef typename mpl::if_<
|
||||
mpl::or_<
|
||||
is_convertible<Facade1, Facade2>
|
||||
, is_convertible<Facade2, Facade1>
|
||||
>
|
||||
, Return
|
||||
, int[3]
|
||||
>::type type;
|
||||
};
|
||||
#else
|
||||
: ::boost::iterators::enable_if<
|
||||
mpl::or_<
|
||||
is_convertible<Facade1, Facade2>
|
||||
@ -73,8 +84,8 @@ namespace boost
|
||||
>
|
||||
, Return
|
||||
>
|
||||
{
|
||||
};
|
||||
{};
|
||||
#endif
|
||||
|
||||
//
|
||||
// Generates associated types for an iterator_facade with the
|
||||
@ -94,9 +105,9 @@ namespace boost
|
||||
|
||||
typedef typename remove_const<ValueParam>::type value_type;
|
||||
|
||||
typedef typename mpl::apply_if<
|
||||
typedef typename mpl::eval_if<
|
||||
detail::iterator_writability_disabled<ValueParam,Reference>
|
||||
, add_pointer<typename add_const<value_type>::type>
|
||||
, add_pointer<const value_type>
|
||||
, add_pointer<value_type>
|
||||
>::type pointer;
|
||||
|
||||
@ -191,6 +202,13 @@ namespace boost
|
||||
*this->stored_iterator = x;
|
||||
return x;
|
||||
}
|
||||
|
||||
// Provides X(r++)
|
||||
operator Iterator const&() const
|
||||
{
|
||||
return stored_iterator;
|
||||
}
|
||||
|
||||
private:
|
||||
mutable value_type stored_value;
|
||||
Iterator stored_iterator;
|
||||
@ -250,10 +268,10 @@ namespace boost
|
||||
// *r also returns a proxy.
|
||||
template <class Iterator, class Value, class Reference, class CategoryOrTraversal>
|
||||
struct postfix_increment_result
|
||||
: mpl::apply_if<
|
||||
: mpl::eval_if<
|
||||
mpl::and_<
|
||||
// A proxy is only needed for readable iterators
|
||||
is_convertible<Reference,Value>
|
||||
// A proxy is only needed for readable iterators
|
||||
is_convertible<Reference,Value const&>
|
||||
|
||||
// No multipass iterator can have values that disappear
|
||||
// before positions can be re-visited
|
||||
@ -305,11 +323,11 @@ namespace boost
|
||||
|
||||
static type make(Reference x)
|
||||
{
|
||||
return type(&x);
|
||||
return implicit_cast<type>(&x);
|
||||
}
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// Deal with ETI
|
||||
template<>
|
||||
struct operator_arrow_result<int, int, int>
|
||||
@ -392,14 +410,14 @@ namespace boost
|
||||
:
|
||||
# ifdef BOOST_NO_ONE_WAY_ITERATOR_INTEROP
|
||||
iterator_difference<I1>
|
||||
# elif BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
# elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
mpl::if_<
|
||||
is_convertible<I2,I1>
|
||||
, typename I1::difference_type
|
||||
, typename I2::difference_type
|
||||
>
|
||||
# else
|
||||
mpl::apply_if<
|
||||
mpl::eval_if<
|
||||
is_convertible<I2,I1>
|
||||
, iterator_difference<I1>
|
||||
, iterator_difference<I2>
|
||||
@ -648,7 +666,7 @@ namespace boost
|
||||
return this->derived();
|
||||
}
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
typename detail::postfix_increment_result<Derived,Value,Reference,CategoryOrTraversal>::type
|
||||
operator++(int)
|
||||
{
|
||||
@ -690,7 +708,7 @@ namespace boost
|
||||
return result -= x;
|
||||
}
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
// There appears to be a bug which trashes the data of classes
|
||||
// derived from iterator_facade when they are assigned unless we
|
||||
// define this assignment operator. This bug is only revealed
|
||||
@ -703,7 +721,7 @@ namespace boost
|
||||
# endif
|
||||
};
|
||||
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
# if !BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <class I, class V, class TC, class R, class D>
|
||||
typename detail::postfix_increment_result<I,V,R,TC>::type
|
||||
operator++(
|
||||
@ -802,8 +820,8 @@ namespace boost
|
||||
is_interoperable< Derived1, Derived2 >::value \
|
||||
)); \
|
||||
return_prefix iterator_core_access::base_op( \
|
||||
static_cast<Derived1 const&>(lhs) \
|
||||
, static_cast<Derived2 const&>(rhs) \
|
||||
*static_cast<Derived1 const*>(&lhs) \
|
||||
, *static_cast<Derived2 const*>(&rhs) \
|
||||
, BOOST_ITERATOR_CONVERTIBLE(Derived2,Derived1) \
|
||||
); \
|
||||
}
|
||||
|
@ -1,8 +1,7 @@
|
||||
// Copyright David Abrahams 2003. Permission to copy, use,
|
||||
// modify, sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Copyright David Abrahams 2003.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef ITERATOR_TRAITS_DWA200347_HPP
|
||||
# define ITERATOR_TRAITS_DWA200347_HPP
|
||||
|
||||
@ -56,7 +55,7 @@ struct BOOST_ITERATOR_CATEGORY
|
||||
typedef typename detail::iterator_traits<Iterator>::iterator_category type;
|
||||
};
|
||||
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, <= 1200)
|
||||
# if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
template <>
|
||||
struct iterator_value<int>
|
||||
{
|
||||
|
@ -1,6 +1,17 @@
|
||||
#ifndef BOOST_NEW_ITERATOR_TESTS_HPP
|
||||
# define BOOST_NEW_ITERATOR_TESTS_HPP
|
||||
|
||||
//
|
||||
// Copyright (c) David Abrahams 2001.
|
||||
// Copyright (c) Jeremy Siek 2001-2003.
|
||||
// Copyright (c) Thomas Witt 2002.
|
||||
//
|
||||
// Use, modification and distribution is subject to the
|
||||
// Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
// This is meant to be the beginnings of a comprehensive, generic
|
||||
// test suite for STL concepts such as iterators and containers.
|
||||
//
|
||||
@ -38,7 +49,7 @@ namespace boost {
|
||||
template <class Iterator, class T>
|
||||
void readable_iterator_traversal_test(Iterator i1, T v, mpl::true_)
|
||||
{
|
||||
T v2 = *i1++;
|
||||
T v2(*i1++);
|
||||
assert(v == v2);
|
||||
}
|
||||
|
||||
@ -51,6 +62,8 @@ void writable_iterator_traversal_test(Iterator i1, T v, mpl::true_)
|
||||
{
|
||||
++i1; // we just wrote into that position
|
||||
*i1++ = v;
|
||||
Iterator x(i1++);
|
||||
(void)x;
|
||||
}
|
||||
|
||||
template <class Iterator, class T>
|
||||
|
@ -1,10 +1,9 @@
|
||||
// (C) Copyright Toon Knapen 2001.
|
||||
// (C) Copyright David Abrahams 2003.
|
||||
// (C) Copyright Roland Richter 2003.
|
||||
// Permission to copy, use, modify, sell and distribute this software
|
||||
// is granted provided this copyright notice appears in all copies.
|
||||
// This software is provided "as is" without express or implied
|
||||
// warranty, and with no claim as to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_PERMUTATION_ITERATOR_HPP
|
||||
#define BOOST_PERMUTATION_ITERATOR_HPP
|
||||
|
@ -1,11 +1,9 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_REVERSE_ITERATOR_23022003THW_HPP
|
||||
#define BOOST_REVERSE_ITERATOR_23022003THW_HPP
|
||||
|
||||
|
@ -1,11 +1,9 @@
|
||||
// (C) Copyright David Abrahams 2002.
|
||||
// (C) Copyright Jeremy Siek 2002.
|
||||
// (C) Copyright Thomas Witt 2002.
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
|
||||
#define BOOST_TRANSFORM_ITERATOR_23022003THW_HPP
|
||||
|
||||
@ -124,7 +122,7 @@ namespace boost
|
||||
transform_iterator(
|
||||
transform_iterator<OtherUnaryFunction, OtherIterator, OtherReference, OtherValue> const& t
|
||||
, typename enable_if_convertible<OtherIterator, Iterator>::type* = 0
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
|
||||
#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310)
|
||||
, typename enable_if_convertible<OtherUnaryFunction, UnaryFunction>::type* = 0
|
||||
#endif
|
||||
)
|
||||
@ -158,9 +156,16 @@ namespace boost
|
||||
// function pointer in the iterator be 0, leading to a runtime
|
||||
// crash.
|
||||
template <class UnaryFunction, class Iterator>
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
typename mpl::if_<
|
||||
#else
|
||||
typename iterators::enable_if<
|
||||
#endif
|
||||
is_class<UnaryFunction> // We should probably find a cheaper test than is_class<>
|
||||
, transform_iterator<UnaryFunction, Iterator>
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
||||
, int[3]
|
||||
#endif
|
||||
>::type
|
||||
make_transform_iterator(Iterator it)
|
||||
{
|
||||
|
@ -19,6 +19,7 @@
|
||||
// Borland 5.5.1 (broken due to lack of support from Boost.Tuples)
|
||||
|
||||
#ifndef BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_
|
||||
# define BOOST_ZIP_ITERATOR_TMB_07_13_2003_HPP_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <boost/iterator.hpp>
|
||||
@ -35,7 +36,7 @@
|
||||
#include <boost/type_traits/is_same.hpp>
|
||||
#include <boost/mpl/and.hpp>
|
||||
#include <boost/mpl/apply.hpp>
|
||||
#include <boost/mpl/apply_if.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/lambda.hpp>
|
||||
#include <boost/mpl/placeholders.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
@ -140,7 +141,7 @@ namespace boost {
|
||||
|
||||
template<typename Tuple, class UnaryMetaFun>
|
||||
struct tuple_meta_transform
|
||||
: mpl::apply_if<
|
||||
: mpl::eval_if<
|
||||
boost::is_same<Tuple, tuples::null_type>
|
||||
, mpl::identity<tuples::null_type>
|
||||
, tuple_meta_transform_impl<Tuple, UnaryMetaFun>
|
||||
@ -179,12 +180,12 @@ namespace boost {
|
||||
, typename StartType
|
||||
>
|
||||
struct tuple_meta_accumulate
|
||||
: mpl::apply_if<
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
: mpl::eval_if<
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
mpl::or_<
|
||||
#endif
|
||||
boost::is_same<Tuple, tuples::null_type>
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1200)
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
|
||||
, boost::is_same<Tuple,int>
|
||||
>
|
||||
#endif
|
||||
@ -337,7 +338,7 @@ namespace boost {
|
||||
typedef typename iterator_traits<Iterator>::reference type;
|
||||
};
|
||||
|
||||
#ifdef BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
|
||||
#ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
|
||||
// Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work
|
||||
// out well. Instantiating the nested apply template also
|
||||
// requires instantiating iterator_traits on the
|
||||
@ -381,7 +382,7 @@ namespace boost {
|
||||
>::type type;
|
||||
};
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, == 1200) // ETI workaround
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) // ETI workaround
|
||||
template <>
|
||||
struct minimum_traversal_category_in_iterator_tuple<int>
|
||||
{
|
||||
@ -400,7 +401,7 @@ namespace boost {
|
||||
{
|
||||
};
|
||||
|
||||
# ifdef BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
|
||||
# ifdef BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
|
||||
// Hack because BOOST_MPL_AUX_LAMBDA_SUPPORT doesn't seem to work
|
||||
// out well. In this case I think it's an MPL bug
|
||||
template<>
|
||||
|
@ -1,13 +1,10 @@
|
||||
// Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
|
||||
#ifndef BOOST_ITERATOR_ADAPTOR_13062003HK_HPP
|
||||
#define BOOST_ITERATOR_ADAPTOR_13062003HK_HPP
|
||||
// Copyright David Abrahams 2004. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef ITERATOR_ADAPTORS_DWA2004725_HPP
|
||||
# define ITERATOR_ADAPTORS_DWA2004725_HPP
|
||||
|
||||
#define BOOST_ITERATOR_ADAPTORS_VERSION 0x0200
|
||||
#include <boost/iterator/iterator_adaptor.hpp>
|
||||
|
||||
#endif // BOOST_ITERATOR_ADAPTOR_13062003HK_HPP
|
||||
#endif // ITERATOR_ADAPTORS_DWA2004725_HPP
|
||||
|
@ -1,8 +1,7 @@
|
||||
// (C) Copyright Jeremy Siek 1999. Permission to copy, use, modify,
|
||||
// sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// (C) Copyright Jeremy Siek 1999.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_INT_ITERATOR_H
|
||||
#define BOOST_INT_ITERATOR_H
|
||||
|
@ -1,8 +1,7 @@
|
||||
// (C) Copyright David Abrahams and Jeremy Siek 2000-2001. Permission to copy,
|
||||
// use, modify, sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided "as is"
|
||||
// without express or implied warranty, and with no claim as to its suitability
|
||||
// for any purpose.
|
||||
// (C) Copyright David Abrahams and Jeremy Siek 2000-2001.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// Revision History:
|
||||
// 04 Jan 2001 Factored counting_iterator stuff into
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright David Abrahams 2003. Permission to copy, use,
|
||||
// modify, sell and distribute this software is granted provided this
|
||||
// copyright notice appears in all copies. This software is provided
|
||||
// "as is" without express or implied warranty, and with no claim as
|
||||
// to its suitability for any purpose.
|
||||
// Copyright David Abrahams 2003.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <boost/iterator_adaptors.hpp>
|
||||
|
@ -1,8 +1,7 @@
|
||||
// Copyright David Abrahams and Jeremy Siek 2003. Permission to copy,
|
||||
// use, modify, sell and distribute this software is granted provided
|
||||
// this copyright notice appears in all copies. This software is
|
||||
// provided "as is" without express or implied warranty, and with no
|
||||
// claim as to its suitability for any purpose.
|
||||
// Copyright David Abrahams and Jeremy Siek 2003.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef BOOST_ITERATOR_TESTS_HPP
|
||||
# define BOOST_ITERATOR_TESTS_HPP
|
||||
|
||||
|
@ -1,18 +1,24 @@
|
||||
// Copyright David Abrahams 2004. Use, modification and distribution is
|
||||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef POINTEE_DWA200415_HPP
|
||||
# define POINTEE_DWA200415_HPP
|
||||
|
||||
// dereferenceable_traits provides access to the value_type and
|
||||
// reference of a Dereferenceable type.
|
||||
//
|
||||
// Copyright David Abrahams 2004. Use, modification and distribution is
|
||||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// typename pointee<P>::type provides the pointee type of P.
|
||||
//
|
||||
// For example, it is T for T* and X for shared_ptr<X>.
|
||||
//
|
||||
// http://www.boost.org/libs/iterator/doc/pointee.html
|
||||
//
|
||||
|
||||
# include <boost/detail/is_incrementable.hpp>
|
||||
# include <boost/iterator/iterator_traits.hpp>
|
||||
# include <boost/type_traits/add_const.hpp>
|
||||
# include <boost/type_traits/remove_cv.hpp>
|
||||
# include <boost/mpl/if.hpp>
|
||||
# include <boost/mpl/apply_if.hpp>
|
||||
# include <boost/mpl/eval_if.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
@ -55,7 +61,7 @@ namespace detail
|
||||
|
||||
template <class P>
|
||||
struct pointee
|
||||
: mpl::apply_if<
|
||||
: mpl::eval_if<
|
||||
detail::is_incrementable<P>
|
||||
, detail::iterator_pointee<P>
|
||||
, detail::smart_ptr_pointee<P>
|
||||
|
Reference in New Issue
Block a user