Works with MSVC and Intel5 now. Thanks, Aleksey!!

[SVN r16165]
This commit is contained in:
Dave Abrahams
2002-11-08 17:08:17 +00:00
parent 1f335d30ba
commit 2bca71488b

View File

@ -58,9 +58,11 @@
# include <boost/type_traits/detail/yes_no_type.hpp> # include <boost/type_traits/detail/yes_no_type.hpp>
# include <boost/type_traits/is_pointer.hpp> # include <boost/type_traits/is_pointer.hpp>
# include <boost/type_traits/is_base_and_derived.hpp> # include <boost/type_traits/is_base_and_derived.hpp>
# include <boost/mpl/aux_/has_xxx.hpp>
# include <iterator> # include <iterator>
# include <cstddef> # include <cstddef>
// should be the last #include // should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp" #include "boost/type_traits/detail/bool_trait_def.hpp"
@ -83,6 +85,12 @@
namespace boost { namespace detail { namespace boost { namespace detail {
BOOST_MPL_HAS_XXX_TRAIT_DEF(value_type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(reference)
BOOST_MPL_HAS_XXX_TRAIT_DEF(pointer)
BOOST_MPL_HAS_XXX_TRAIT_DEF(difference_type)
BOOST_MPL_HAS_XXX_TRAIT_DEF(iterator_category)
# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) # if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR)
using std::iterator_traits; using std::iterator_traits;
using std::distance; using std::distance;
@ -125,23 +133,16 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(
// A metafunction returning true iff T has all the requisite nested // A metafunction returning true iff T has all the requisite nested
// types to satisfy the requirements for a fully-conforming // types to satisfy the requirements for a fully-conforming
// iterator_traits implementation. // iterator_traits implementation.
template <class T>
type_traits::yes_type is_full_iterator_traits_helper(
T const volatile*
, BOOST_DEDUCED_TYPENAME T::value_type* = 0
, BOOST_DEDUCED_TYPENAME T::reference (*)() = 0
, BOOST_DEDUCED_TYPENAME T::pointer* = 0
, BOOST_DEDUCED_TYPENAME T::difference_type* = 0
, BOOST_DEDUCED_TYPENAME T::iterator_category* = 0
);
type_traits::no_type is_full_iterator_traits_helper(...);
template <class T> template <class T>
struct is_full_iterator_traits_impl struct is_full_iterator_traits_impl
{ {
enum { value = sizeof( enum { value =
is_full_iterator_traits_helper((T*)0)) == sizeof(type_traits::yes_type) }; has_value_type<T>::value
& has_reference<T>::value
& has_pointer<T>::value
& has_difference_type<T>::value
& has_iterator_category<T>::value
};
}; };
BOOST_TT_AUX_BOOL_TRAIT_DEF1( BOOST_TT_AUX_BOOL_TRAIT_DEF1(
@ -149,28 +150,23 @@ BOOST_TT_AUX_BOOL_TRAIT_DEF1(
# ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF # ifdef BOOST_BAD_CONTAINER_ITERATOR_CATEGORY_TYPEDEF
BOOST_MPL_HAS_XXX_TRAIT_DEF(_Iterator_category)
// is_stlport_40_debug_iterator -- // is_stlport_40_debug_iterator --
// //
// A metafunction returning true iff T has all the requisite nested // A metafunction returning true iff T has all the requisite nested
// types to satisfy the requirements of an STLPort 4.0 debug iterator // types to satisfy the requirements of an STLPort 4.0 debug iterator
// iterator_traits implementation. // iterator_traits implementation.
template <class T>
type_traits::yes_type is_stlport_40_debug_iterator_helper(
T const volatile*
, BOOST_DEDUCED_TYPENAME T::value_type* = 0
, BOOST_DEDUCED_TYPENAME T::reference (*)() = 0
, BOOST_DEDUCED_TYPENAME T::pointer* = 0
, BOOST_DEDUCED_TYPENAME T::difference_type* = 0
, BOOST_DEDUCED_TYPENAME T::_Iterator_category* = 0
);
type_traits::no_type is_stlport_40_debug_iterator_helper(...);
template <class T> template <class T>
struct is_stlport_40_debug_iterator_impl struct is_stlport_40_debug_iterator_impl
{ {
enum { value = sizeof( enum { value =
is_stlport_40_debug_iterator_helper((T*)0)) == sizeof(type_traits::yes_type) }; has_value_type<T>::value
& has_reference<T>::value
& has_pointer<T>::value
& has_difference_type<T>::value
& has__Iterator_category<T>::value
};
}; };
BOOST_TT_AUX_BOOL_TRAIT_DEF1( BOOST_TT_AUX_BOOL_TRAIT_DEF1(