forked from boostorg/iterator
Improved workaround tests
[SVN r794]
This commit is contained in:
@@ -14,6 +14,10 @@
|
|||||||
|
|
||||||
#include "boost/type_traits/detail/bool_trait_def.hpp"
|
#include "boost/type_traits/detail/bool_trait_def.hpp"
|
||||||
|
|
||||||
|
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1301) || BOOST_WORKAROUND(__GNUC__, <= 2 && __GNUC_MINOR__ <= 95) || BOOST_WORKAROUND(__MWERKS__, <= 0x3000)
|
||||||
|
# define BOOST_NO_SFINAE // "Substitution Failure Is Not An Error not implemented"
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
@@ -34,7 +38,7 @@ namespace boost {
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
struct base
|
struct base
|
||||||
{
|
{
|
||||||
#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
|
#ifdef BOOST_NO_SFINAE
|
||||||
// Disable enable if for MSVC
|
// Disable enable if for MSVC
|
||||||
typedef T type;
|
typedef T type;
|
||||||
|
|
||||||
@@ -563,7 +567,8 @@ namespace boost {
|
|||||||
struct has_element_type
|
struct has_element_type
|
||||||
: mpl::if_<
|
: mpl::if_<
|
||||||
is_class<T>
|
is_class<T>
|
||||||
# if __GNUC__ == 2 // gcc 2.95 doesn't seem to be able to detect element_type without barfing
|
// gcc 2.95 doesn't seem to be able to detect element_type without barfing
|
||||||
|
# if BOOST_WORKAROUND(__GNUC__, == 2 && __GNUC_MINOR__ == 95)
|
||||||
, mpl::bool_c<false>
|
, mpl::bool_c<false>
|
||||||
# else
|
# else
|
||||||
, aux::has_element_type<T>
|
, aux::has_element_type<T>
|
||||||
|
@@ -18,9 +18,13 @@
|
|||||||
#include <boost/iterator/iterator_adaptors.hpp>
|
#include <boost/iterator/iterator_adaptors.hpp>
|
||||||
#include <boost/iterator/iterator_concepts.hpp>
|
#include <boost/iterator/iterator_concepts.hpp>
|
||||||
#include <boost/iterator/new_iterator_tests.hpp>
|
#include <boost/iterator/new_iterator_tests.hpp>
|
||||||
|
|
||||||
|
#include <boost/detail/workaround.hpp>
|
||||||
|
|
||||||
#include <boost/concept_archetype.hpp>
|
#include <boost/concept_archetype.hpp>
|
||||||
#include <boost/concept_check.hpp>
|
#include <boost/concept_check.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <set>
|
#include <set>
|
||||||
@@ -87,8 +91,9 @@ void more_indirect_iterator_tests()
|
|||||||
|
|
||||||
// Older Dinkumware and GCC standard lib don't supply symmetric constant/mutable
|
// Older Dinkumware and GCC standard lib don't supply symmetric constant/mutable
|
||||||
// iterator operators
|
// iterator operators
|
||||||
#if !defined(BOOST_MSVC_STD_ITERATOR) && (!defined(_CPPLIB_VER) || _CPPLIB_VER > 310) \
|
#if !defined(BOOST_MSVC_STD_ITERATOR) \
|
||||||
&& (__GNUC__ != 2 || defined(__SGI_STL_PORT))
|
&& !BOOST_WORKAROUND(_CPPLIB_VER, <= 310) \
|
||||||
|
&& !BOOST_WORKAROUND(__GNUC__, <= 2 && !defined(__SGI_STL_PORT))
|
||||||
|
|
||||||
assert(db == dci);
|
assert(db == dci);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user