checkpoint

[SVN r20733]
This commit is contained in:
Dave Abrahams
2003-11-08 04:12:18 +00:00
parent 20f188d971
commit 6ec791e3b9
4 changed files with 48 additions and 8 deletions

View File

@ -18,7 +18,46 @@
#include <boost/config.hpp> // for prior
#include <boost/detail/workaround.hpp>
#define BOOST_ITERATOR_CONFIG_DEF // if you get an error here, you have nested config_def #inclusion.
#ifdef BOOST_ITERATOR_CONFIG_DEF
# error you have nested config_def #inclusion.
#else
# define BOOST_ITERATOR_CONFIG_DEF
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) \
|| (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER))
# define BOOST_NO_LVALUE_RETURN_DETECTION
# if 0 // test code
struct v {};
typedef char (&no)[3];
template <class T>
no foo(T const&, ...);
template <class T>
char foo(T&, int);
struct value_iterator
{
v operator*() const;
};
template <class T>
struct lvalue_deref_helper
{
static T& x;
enum { value = (sizeof(foo(*x,0)) == 1) };
};
int z2[(lvalue_deref_helper<v*>::value == 1) ? 1 : -1];
int z[(lvalue_deref_helper<value_iterator>::value) == 1 ? -1 : 1 ];
# endif
#endif
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|| BOOST_WORKAROUND(__GNUC__, <= 2 && __GNUC_MINOR__ <= 95) \

View File

@ -18,6 +18,7 @@
#undef BOOST_NO_IS_CONVERTIBLE_TEMPLATE
#undef BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
#undef BOOST_ARG_DEPENDENT_TYPENAME
#undef BOOST_NO_LVALUE_RETURN_DETECTION
#ifdef BOOST_ITERATOR_CONFIG_DEF
# undef BOOST_ITERATOR_CONFIG_DEF

View File

@ -302,7 +302,7 @@ namespace boost {
// writability at the level of input iterator/output iterator.
template <>
struct iterator_tag_base<
readable_iterator|lvalue_iterator
access_c<(readable_iterator|lvalue_iterator)>
, single_pass_traversal_tag
>
{
@ -378,7 +378,7 @@ namespace boost {
>::type
{
typedef detail::access_c<(Access & ~lvalue_iterator)> access_type;
BOOST_STATIC_CONSTANT(iterator_access, access_type::value);
BOOST_STATIC_CONSTANT(iterator_access, value = (iterator_access)(Access & ~lvalue_iterator));
typedef TraversalTag traversal;
};
@ -389,8 +389,8 @@ namespace boost {
struct is_boost_iterator_tag
: mpl::false_ {};
template <class R, class T>
struct is_boost_iterator_tag<iterator_tag<R,T> >
template <unsigned A, class T>
struct is_boost_iterator_tag<iterator_tag<A,T> >
: mpl::true_ {};
# else
template <class T>
@ -399,8 +399,8 @@ namespace boost {
typedef char (&yes)[1];
typedef char (&no)[2];
template <class R, class U>
static yes test(mpl::identity<iterator_tag<R,U> >*);
template <unsigned A, class U>
static yes test(mpl::identity<iterator_tag<A,U> >*);
static no test(...);
static mpl::identity<T>* inst;

View File

@ -340,7 +340,7 @@ namespace boost
template <
class Derived // The derived iterator type being constructed
, class Value
, class AccessCategory
, unsigned AccessCategory
, class TraversalCategory
, class Reference = Value&
, class Difference = std::ptrdiff_t