Compare commits

..

60 Commits

Author SHA1 Message Date
986855db16 This commit was manufactured by cvs2svn to create branch
'thread_rewrite'.

[SVN r30953]
2005-09-13 14:20:32 +00:00
48f7be7015 Workaround for non-conforming definition of std::ostream_iterator on Tru64/CXX.
[SVN r30852]
2005-09-07 16:03:55 +00:00
bbef2422ad Qualify boost::detail
[SVN r30736]
2005-08-30 10:44:32 +00:00
ae45f7abf7 Large patch from Ulrich Eckhardt to fix support for EVC++ 4.
[SVN r30670]
2005-08-25 16:27:28 +00:00
6363297754 Merged from 1.33.0 release
[SVN r30540]
2005-08-12 13:02:37 +00:00
55fd9078a1 Renamed to avoid >31 char filename.
[SVN r30088]
2005-07-14 21:10:07 +00:00
e22bb495db vc6-stlport workaround
[SVN r29795]
2005-06-26 13:21:09 +00:00
54ae365c98 Further generalized vc6 workaround
[SVN r29788]
2005-06-24 18:47:21 +00:00
a9483b5633 Kill off vc6/stlport error more generally and more specifically
[SVN r29786]
2005-06-24 18:34:17 +00:00
65fe75e558 Workarounds for Borland
Improved assertion output


[SVN r29779]
2005-06-24 15:37:23 +00:00
7a43350655 Avoid some Borland bugs by defining operators explicitly rather than
using partially_ordered<...> to generate them.


[SVN r29757]
2005-06-23 18:20:37 +00:00
df49ae74e0 Define BOOST_NO_LVALUE_RETURN_DETECTION for Tru64/CXX-6.5.
[SVN r29545]
2005-06-13 08:22:38 +00:00
3fe9b7517e updated docs
[SVN r29099]
2005-05-20 15:32:55 +00:00
ab372a0a74 Added failing test for missing #include guard, then fixed it.
[SVN r28459]
2005-04-24 11:48:23 +00:00
f9c4915b55 Sync with V1
[SVN r28241]
2005-04-14 11:37:17 +00:00
741da59c0d Link to documentation added.
[SVN r27745]
2005-03-20 14:53:58 +00:00
a0b28e4c8b Fix for indirect iterators to abstract classes.
[SVN r27625]
2005-03-12 23:10:43 +00:00
ef895f0cc7 Apply typo fixes from Julio M. Merino Vidal
[SVN r27513]
2005-02-27 17:28:24 +00:00
1d018cc602 Borland workaround. Replace 'add_const<value_type>::type with
'const value_type' in the code which computed the pointer type. Borland
did not property add const type with 'add_const'.


[SVN r27388]
2005-02-15 12:41:23 +00:00
88697aad65 merge from RC_1_32_0 branch
[SVN r26942]
2005-01-30 21:36:16 +00:00
7344357e32 merge changes from RC_1_32_0
[SVN r26891]
2005-01-28 07:42:05 +00:00
80501e1eb2 merge changes from RC_1_32_0
[SVN r26888]
2005-01-28 07:34:17 +00:00
7707262a07 base_type patch from Eric Niebler
[SVN r26818]
2005-01-23 15:40:15 +00:00
ba3e7a459e Allow for bidirectional filtered_iterators
[SVN r26491]
2004-12-13 09:31:17 +00:00
295ae05e40 Fix the problems described in this thread:
http://lists.boost.org/MailArchives/boost-users/msg08656.php


[SVN r26410]
2004-12-03 09:55:30 +00:00
68268f81eb Stop relying on T(x) to do implicit conversion; it *casts* when T is a builtin!
[SVN r26393]
2004-12-01 16:46:06 +00:00
3b60f75bc6 Stop reserving rights.
[SVN r26085]
2004-11-02 14:31:27 +00:00
a8f528130a Stop reserving rights.
[SVN r26067]
2004-11-01 21:23:47 +00:00
c0788f2cd8 kill dead reference
[SVN r26015]
2004-10-31 12:38:45 +00:00
c6bc3b2547 added copyrights
[SVN r25810]
2004-10-20 13:20:19 +00:00
27adbbb6ed c++boost.gif -> boost.png replacement
[SVN r25573]
2004-10-05 15:45:52 +00:00
1f999864a1 Fix 31 character limit
[SVN r25193]
2004-09-18 13:32:24 +00:00
65af4c96a9 Move indirect_traits to boost/detail
[SVN r25117]
2004-09-15 15:00:12 +00:00
aa9e49b727 Fix >31 character filenames
[SVN r25040]
2004-09-13 14:39:59 +00:00
3318c82f83 Copyright
[SVN r25037]
2004-09-13 13:31:33 +00:00
68791c337a Remove GPL'd material
[SVN r25036]
2004-09-13 13:30:33 +00:00
a396085bc0 Added new types boost::long_long_type and boost::ulong_long_type in boost/config.hpp and applied these types in place of "long long" throughout. As a result, almost all of boost now compiles cleanly with -ansi -pedantic with gcc. Changes tested with gcc 3.3, 2.95, VC7.1 and Intel 8.
[SVN r24899]
2004-09-04 10:34:49 +00:00
6196a6e591 merge new MPL version from 'mplbook' branch
[SVN r24874]
2004-09-02 15:41:37 +00:00
4e07575b78 Update tests for fixed postfix increment
[SVN r24617]
2004-08-20 16:04:11 +00:00
557ef60557 Converted files to the BSL.
[SVN r24614]
2004-08-20 11:10:24 +00:00
4b583d3aa0 License update
[SVN r24598]
2004-08-19 15:23:47 +00:00
3eca5e8f60 License updates
[SVN r24597]
2004-08-19 15:19:17 +00:00
5947d569b9 License update
[SVN r24596]
2004-08-19 15:11:49 +00:00
e469abbf57 Work around an MSVC-stlport ICE
[SVN r24567]
2004-08-18 19:00:18 +00:00
c141f6cc59 obsolete
[SVN r24508]
2004-08-16 14:24:49 +00:00
55f8a6380a Moved to BSL
[SVN r24446]
2004-08-12 17:13:07 +00:00
9c955e8af2 Moved to BSL
[SVN r24445]
2004-08-12 17:02:24 +00:00
82108581b9 Make sure that X(r++) works for writable iterators.
[SVN r24420]
2004-08-11 19:54:40 +00:00
c4834d363e More (C).
[SVN r24383]
2004-08-10 15:12:53 +00:00
7194aff64c Fixed license added (only) my (C).
[SVN r24379]
2004-08-10 14:44:17 +00:00
ca41a4f902 Fixed (C) and license.
[SVN r24378]
2004-08-10 14:41:52 +00:00
47a3392c80 Removed Boost.org copyrights and replaced with originating authors copyright instead.
[SVN r24372]
2004-08-10 12:53:34 +00:00
bd765a21fb Eliminated unreviewed, unused, noncompiling code
[SVN r24314]
2004-08-05 18:57:39 +00:00
cad110e0f3 aCC workaround from From: "DY, JERRY U \(SBCSI\)" <jd2419-at-sbc.com>
[SVN r24254]
2004-08-03 00:38:26 +00:00
3599398eca Workaround CW8 issues with using static_cast on templates with template ctors.
[SVN r24214]
2004-07-31 22:56:49 +00:00
dd72d599c8 Disable interop properly for vc6/7 using known SFINAE capabilities.
[SVN r24209]
2004-07-31 18:10:00 +00:00
1a9677d9dc Stop support CW7; workaround for aCC
[SVN r24191]
2004-07-30 16:36:36 +00:00
a6d200f262 Converted to Boost Software License, Version 1.0
[SVN r24055]
2004-07-26 00:32:12 +00:00
0c28649d0b Remove tabs in file.
[SVN r24043]
2004-07-25 17:12:17 +00:00
d6405ddd54 Fix license
[SVN r24034]
2004-07-25 14:24:27 +00:00
30 changed files with 276 additions and 643 deletions

View File

@ -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:

View File

@ -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_

View File

@ -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

View File

@ -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>

View File

@ -1 +0,0 @@
#error obsolete

View File

@ -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

View File

@ -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

View File

@ -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
};

View File

@ -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>

View File

@ -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

View File

@ -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
)

View File

@ -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>

View File

@ -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

View File

@ -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)
{

View File

@ -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
>

View File

@ -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

View File

@ -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>

View File

@ -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) \
); \
}

View File

@ -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>
{

View File

@ -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>

View File

@ -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

View File

@ -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

View File

@ -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)
{

View File

@ -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<>

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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

View File

@ -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>