1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/stdapis/boost/iterator/detail/config_def.hpp Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,135 @@
1.4 +// (C) Copyright David Abrahams 2002.
1.5 +// (C) Copyright Jeremy Siek 2002.
1.6 +// (C) Copyright Thomas Witt 2002.
1.7 +// Distributed under the Boost Software License, Version 1.0. (See
1.8 +// accompanying file LICENSE_1_0.txt or copy at
1.9 +// http://www.boost.org/LICENSE_1_0.txt)
1.10 +
1.11 +// no include guard multiple inclusion intended
1.12 +
1.13 +//
1.14 +// This is a temporary workaround until the bulk of this is
1.15 +// available in boost config.
1.16 +// 23/02/03 thw
1.17 +//
1.18 +
1.19 +#include <boost/config.hpp> // for prior
1.20 +#include <boost/detail/workaround.hpp>
1.21 +
1.22 +#ifdef BOOST_ITERATOR_CONFIG_DEF
1.23 +# error you have nested config_def #inclusion.
1.24 +#else
1.25 +# define BOOST_ITERATOR_CONFIG_DEF
1.26 +#endif
1.27 +
1.28 +// We enable this always now. Otherwise, the simple case in
1.29 +// libs/iterator/test/constant_iterator_arrow.cpp fails to compile
1.30 +// because the operator-> return is improperly deduced as a non-const
1.31 +// pointer.
1.32 +#if 1 || defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
1.33 + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531))
1.34 +
1.35 +// Recall that in general, compilers without partial specialization
1.36 +// can't strip constness. Consider counting_iterator, which normally
1.37 +// passes a const Value to iterator_facade. As a result, any code
1.38 +// which makes a std::vector of the iterator's value_type will fail
1.39 +// when its allocator declares functions overloaded on reference and
1.40 +// const_reference (the same type).
1.41 +//
1.42 +// Furthermore, Borland 5.5.1 drops constness in enough ways that we
1.43 +// end up using a proxy for operator[] when we otherwise shouldn't.
1.44 +// Using reference constness gives it an extra hint that it can
1.45 +// return the value_type from operator[] directly, but is not
1.46 +// strictly necessary. Not sure how best to resolve this one.
1.47 +
1.48 +# define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1
1.49 +
1.50 +#endif
1.51 +
1.52 +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
1.53 + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) \
1.54 + || (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \
1.55 + || BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
1.56 +# define BOOST_NO_LVALUE_RETURN_DETECTION
1.57 +
1.58 +# if 0 // test code
1.59 + struct v {};
1.60 +
1.61 + typedef char (&no)[3];
1.62 +
1.63 + template <class T>
1.64 + no foo(T const&, ...);
1.65 +
1.66 + template <class T>
1.67 + char foo(T&, int);
1.68 +
1.69 +
1.70 + struct value_iterator
1.71 + {
1.72 + v operator*() const;
1.73 + };
1.74 +
1.75 + template <class T>
1.76 + struct lvalue_deref_helper
1.77 + {
1.78 + static T& x;
1.79 + enum { value = (sizeof(foo(*x,0)) == 1) };
1.80 + };
1.81 +
1.82 + int z2[(lvalue_deref_helper<v*>::value == 1) ? 1 : -1];
1.83 + int z[(lvalue_deref_helper<value_iterator>::value) == 1 ? -1 : 1 ];
1.84 +# endif
1.85 +
1.86 +#endif
1.87 +
1.88 +#if BOOST_WORKAROUND(__MWERKS__, <=0x2407)
1.89 +# define BOOST_NO_IS_CONVERTIBLE // "is_convertible doesn't work for simple types"
1.90 +#endif
1.91 +
1.92 +#if BOOST_WORKAROUND(__GNUC__, == 2) \
1.93 + || BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \
1.94 + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
1.95 +# define BOOST_NO_IS_CONVERTIBLE_TEMPLATE // The following program fails to compile:
1.96 +
1.97 +# if 0 // test code
1.98 + #include <boost/type_traits/is_convertible.hpp>
1.99 + template <class T>
1.100 + struct foo
1.101 + {
1.102 + foo(T);
1.103 +
1.104 + template <class U>
1.105 + foo(foo<U> const& other) : p(other.p) { }
1.106 +
1.107 + T p;
1.108 + };
1.109 +
1.110 + bool x = boost::is_convertible<foo<int const*>, foo<int*> >::value;
1.111 +# endif
1.112 +
1.113 +#endif
1.114 +
1.115 +
1.116 +#if !defined(BOOST_MSVC) && (defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE))
1.117 +# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
1.118 +#endif
1.119 +
1.120 +# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
1.121 +# define BOOST_ARG_DEPENDENT_TYPENAME typename
1.122 +# else
1.123 +# define BOOST_ARG_DEPENDENT_TYPENAME
1.124 +# endif
1.125 +
1.126 +# if BOOST_WORKAROUND(__GNUC__, == 2) && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(95)) \
1.127 + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
1.128 +
1.129 +// GCC-2.95 eagerly instantiates templated constructors and conversion
1.130 +// operators in convertibility checks, causing premature errors.
1.131 +//
1.132 +// Borland's problems are harder to diagnose due to lack of an
1.133 +// instantiation stack backtrace. They may be due in part to the fact
1.134 +// that it drops cv-qualification willy-nilly in templates.
1.135 +# define BOOST_NO_ONE_WAY_ITERATOR_INTEROP
1.136 +# endif
1.137 +
1.138 +// no include guard; multiple inclusion intended