From a61df20f6128e5cfbf62c1dd4234865859db26a6 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 11 Jan 2003 23:18:14 +0000 Subject: [PATCH] bugfix, borland workarounds [SVN r846] --- include/boost/iterator/iterator_categories.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/include/boost/iterator/iterator_categories.hpp b/include/boost/iterator/iterator_categories.hpp index 7fa91ec..16bab94 100644 --- a/include/boost/iterator/iterator_categories.hpp +++ b/include/boost/iterator/iterator_categories.hpp @@ -126,7 +126,8 @@ namespace boost { mpl::logical_not< is_output_iterator > > {}; -#elif BOOST_WORKAROUND(__GNUC__, == 2 && __GNUC_MINOR__ == 95) +#elif BOOST_WORKAROUND(__GNUC__, == 2 && __GNUC_MINOR__ == 95) \ + || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) template struct is_new_iterator_tag @@ -282,11 +283,15 @@ namespace boost { template struct is_boost_iterator_tag_impl { + typedef char (&yes)[1]; + typedef char (&no)[2]; + template - static char (& test(iterator_tag const&) )[1]; - static char (& test(...) )[2]; + static yes test(iterator_tag const&); + static no test(...); + static T inst; - BOOST_STATIC_CONSTANT(bool, value = sizeof(test(inst)) == 1); + BOOST_STATIC_CONSTANT(bool, value = sizeof(test(inst)) == sizeof(yes)); }; template