2003-07-07 14:20:34 +00:00
|
|
|
// (C) Copyright David Abrahams 2002.
|
|
|
|
// (C) Copyright Jeremy Siek 2002.
|
|
|
|
// (C) Copyright Thomas Witt 2002.
|
2004-08-12 17:02:24 +00:00
|
|
|
// 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)
|
2003-07-07 14:20:34 +00:00
|
|
|
|
|
|
|
// no include guard multiple inclusion intended
|
|
|
|
|
|
|
|
//
|
|
|
|
// This is a temporary workaround until the bulk of this is
|
|
|
|
// available in boost config.
|
|
|
|
// 23/02/03 thw
|
|
|
|
//
|
|
|
|
|
|
|
|
#include <boost/config.hpp> // for prior
|
|
|
|
#include <boost/detail/workaround.hpp>
|
|
|
|
|
2003-11-22 01:18:37 +00:00
|
|
|
#ifdef BOOST_ITERATOR_CONFIG_DEF
|
|
|
|
# error you have nested config_def #inclusion.
|
|
|
|
#else
|
|
|
|
# define BOOST_ITERATOR_CONFIG_DEF
|
|
|
|
#endif
|
|
|
|
|
2004-12-03 09:55:30 +00:00
|
|
|
// 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) \
|
2003-11-22 01:18:37 +00:00
|
|
|
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531))
|
|
|
|
|
|
|
|
// Recall that in general, compilers without partial specialization
|
|
|
|
// can't strip constness. Consider counting_iterator, which normally
|
|
|
|
// passes a const Value to iterator_facade. As a result, any code
|
|
|
|
// which makes a std::vector of the iterator's value_type will fail
|
|
|
|
// when its allocator declares functions overloaded on reference and
|
|
|
|
// const_reference (the same type).
|
|
|
|
//
|
|
|
|
// Furthermore, Borland 5.5.1 drops constness in enough ways that we
|
|
|
|
// 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
|
2005-02-27 17:28:24 +00:00
|
|
|
// strictly necessary. Not sure how best to resolve this one.
|
2003-11-22 01:18:37 +00:00
|
|
|
|
|
|
|
# define BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY 1
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \
|
|
|
|
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x531)) \
|
2005-06-13 08:22:38 +00:00
|
|
|
|| (BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION, <= 700) && defined(_MSC_VER)) \
|
Merged revisions 41954-41983 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r41955 | schoepflin | 2007-12-10 05:40:56 -0800 (Mon, 10 Dec 2007) | 1 line
Treated Rogue Wave library concept check failure on Tru64/CXX.
........
r41956 | dave | 2007-12-10 07:19:21 -0800 (Mon, 10 Dec 2007) | 2 lines
SunPro 5.9 can't detect lvalue returns
........
r41957 | t_schwinger | 2007-12-10 10:26:38 -0800 (Mon, 10 Dec 2007) | 3 lines
changes msvc-7.1 to msvc-7.1*
........
r41966 | johnmaddock | 2007-12-11 08:37:22 -0800 (Tue, 11 Dec 2007) | 1 line
Fixes #1454.
........
r41968 | johnmaddock | 2007-12-11 09:16:21 -0800 (Tue, 11 Dec 2007) | 1 line
Fixes #1504.
........
r41970 | johnmaddock | 2007-12-11 09:19:03 -0800 (Tue, 11 Dec 2007) | 1 line
Fixes #1455.
........
r41973 | johnmaddock | 2007-12-11 09:28:15 -0800 (Tue, 11 Dec 2007) | 1 line
Fixes #1471.
........
r41976 | johnmaddock | 2007-12-11 10:51:57 -0800 (Tue, 11 Dec 2007) | 1 line
Fixes #1474.
........
r41979 | vladimir_prus | 2007-12-11 11:41:47 -0800 (Tue, 11 Dec 2007) | 1 line
Put add-usage-requirements back
........
r41980 | vladimir_prus | 2007-12-11 11:45:37 -0800 (Tue, 11 Dec 2007) | 1 line
Implement ISFILE for real
........
r41981 | vladimir_prus | 2007-12-11 11:46:19 -0800 (Tue, 11 Dec 2007) | 2 lines
When searching for headers, ignore directories, just like gcc does.
........
r41983 | bgubenko | 2007-12-11 12:43:11 -0800 (Tue, 11 Dec 2007) | 1 line
remove conditionalization for aCC: this header works with gcc on HP-UX also
........
[SVN r41984]
2007-12-11 22:00:07 +00:00
|
|
|
|| BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042)) \
|
|
|
|
|| BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
|
|
|
|
|
2003-11-22 01:18:37 +00:00
|
|
|
# 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
|
2003-07-07 14:20:34 +00:00
|
|
|
|
|
|
|
#if BOOST_WORKAROUND(__MWERKS__, <=0x2407)
|
|
|
|
# define BOOST_NO_IS_CONVERTIBLE // "is_convertible doesn't work for simple types"
|
|
|
|
#endif
|
|
|
|
|
2004-01-07 15:21:57 +00:00
|
|
|
#if BOOST_WORKAROUND(__GNUC__, == 2) \
|
|
|
|
|| BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4) && !defined(__EDG_VERSION__) \
|
2004-01-03 02:47:08 +00:00
|
|
|
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
|
2003-07-07 14:20:34 +00:00
|
|
|
# define BOOST_NO_IS_CONVERTIBLE_TEMPLATE // The following program fails to compile:
|
|
|
|
|
|
|
|
# if 0 // test code
|
2004-01-03 02:47:08 +00:00
|
|
|
#include <boost/type_traits/is_convertible.hpp>
|
2003-07-07 14:20:34 +00:00
|
|
|
template <class T>
|
|
|
|
struct foo
|
|
|
|
{
|
|
|
|
foo(T);
|
|
|
|
|
|
|
|
template <class U>
|
|
|
|
foo(foo<U> const& other) : p(other.p) { }
|
|
|
|
|
|
|
|
T p;
|
|
|
|
};
|
|
|
|
|
|
|
|
bool x = boost::is_convertible<foo<int const*>, foo<int*> >::value;
|
|
|
|
# endif
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2004-07-31 18:10:00 +00:00
|
|
|
#if !defined(BOOST_MSVC) && (defined(BOOST_NO_SFINAE) || defined(BOOST_NO_IS_CONVERTIBLE) || defined(BOOST_NO_IS_CONVERTIBLE_TEMPLATE))
|
2003-07-07 14:20:34 +00:00
|
|
|
# define BOOST_NO_STRICT_ITERATOR_INTEROPERABILITY
|
|
|
|
#endif
|
|
|
|
|
|
|
|
# if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
|
|
|
# define BOOST_ARG_DEPENDENT_TYPENAME typename
|
|
|
|
# else
|
|
|
|
# define BOOST_ARG_DEPENDENT_TYPENAME
|
|
|
|
# endif
|
|
|
|
|
2004-01-24 17:39:45 +00:00
|
|
|
# if BOOST_WORKAROUND(__GNUC__, == 2) && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(95)) \
|
|
|
|
|| BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
|
|
|
|
|
|
|
|
// GCC-2.95 eagerly instantiates templated constructors and conversion
|
|
|
|
// operators in convertibility checks, causing premature errors.
|
|
|
|
//
|
|
|
|
// Borland's problems are harder to diagnose due to lack of an
|
|
|
|
// instantiation stack backtrace. They may be due in part to the fact
|
|
|
|
// that it drops cv-qualification willy-nilly in templates.
|
|
|
|
# define BOOST_NO_ONE_WAY_ITERATOR_INTEROP
|
|
|
|
# endif
|
|
|
|
|
|
|
|
// no include guard; multiple inclusion intended
|