From 1b51ce460cd8283dac93f61b0df83520f2c72ab0 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sun, 4 Mar 2001 15:08:17 +0000 Subject: [PATCH] More attempted fixes for Intel C++ [SVN r9406] --- include/boost/detail/iterator.hpp | 50 +++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/include/boost/detail/iterator.hpp b/include/boost/detail/iterator.hpp index 9f71a24..d97bfd7 100644 --- a/include/boost/detail/iterator.hpp +++ b/include/boost/detail/iterator.hpp @@ -28,6 +28,7 @@ // See http://www.boost.org for most recent version including documentation. // Revision History +// 04 Mar 2001 - More attempted fixes for Intel C++ (David Abrahams) // 03 Mar 2001 - Put all implementation into namespace // boost::detail::iterator_traits_. Some progress made on fixes // for Intel compiler. (David Abrahams) @@ -65,6 +66,10 @@ # include # include # include +# if 0 && defined(__ICL) // Re-enable this to pick up the Intel fixes where they left off +# include +# include +# endif # endif @@ -86,7 +91,7 @@ # endif // STLPort <= 4.1b4 && no partial specialization namespace boost { namespace detail { -# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# if !defined(BOOST_NO_STD_ITERATOR_TRAITS) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) using std::iterator_traits; using std::distance; # else @@ -243,9 +248,45 @@ template <> struct msvc_traits_select // falls into. // Is the iterator derived from std::iterator? +no_type is_std_iterator_helper(...); template yes_type is_std_iterator_helper(const volatile std::iterator*); -no_type is_std_iterator_helper(...); + +#if 0 && defined(__ICL) // re-enable this to pick up with the Intel C++ fixes where they left off +// for some reason, it's unable to make the deduction of derivation :( +template +yes_type is_std_iterator_helper(const volatile typename std::_Tree::iterator*); +template +yes_type is_std_iterator_helper(const volatile typename std::list::iterator*); +template +yes_type is_std_iterator_helper(const volatile typename std::deque::iterator*); + +template +yes_type is_std_iterator_helper(const volatile typename std::_Tree::const_iterator*); +template +yes_type is_std_iterator_helper(const volatile typename std::list::const_iterator*); +template +yes_type is_std_iterator_helper(const volatile typename std::deque::const_iterator*); + +template +yes_type is_std_iterator_helper(const volatile std::reverse_iterator*); +template +yes_type is_std_iterator_helper(const volatile std::reverse_bidirectional_iterator*); +template +yes_type is_std_iterator_helper(const volatile std::back_insert_iterator*); +template +yes_type is_std_iterator_helper(const volatile std::front_insert_iterator*); +template +yes_type is_std_iterator_helper(const volatile std::insert_iterator*); +template +yes_type is_std_iterator_helper(const volatile std::istream_iterator*); +template +yes_type is_std_iterator_helper(const volatile std::istreambuf_iterator*); +template +yes_type is_std_iterator_helper(const volatile std::ostreambuf_iterator*); +template +yes_type is_std_iterator_helper(const volatile std::raw_storage_iterator*); +#endif // Is the iterator derived from boost::iterator? template @@ -266,7 +307,10 @@ template yes_type is_ostream_iterator_helper(const volatile std::ostream_iterator*); no_type is_ostream_iterator_helper(...); -#ifdef __ICL +#if 0 && defined(__ICL) +// this static assertion highlights the first of a few problems getting this to +// work with the Intel compiler. We can get past it with the many definitions +// for is_std_iterator_helper above, but there are other failures. template struct check; template <> struct check {}; check<(sizeof(is_std_iterator_helper((std::istream_iterator*)0)) == sizeof(yes_type))> assertion;