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