From daf876a550c1ec44bc0f0e876e80a92ed2a66398 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Thu, 12 Jun 2003 10:17:31 +0000 Subject: [PATCH] is_sequence fix for MSVC 6.5/7.0 [SVN r18785] --- include/boost/mpl/is_sequence.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/boost/mpl/is_sequence.hpp b/include/boost/mpl/is_sequence.hpp index db101ed..3c1985f 100644 --- a/include/boost/mpl/is_sequence.hpp +++ b/include/boost/mpl/is_sequence.hpp @@ -18,7 +18,7 @@ #define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED #include "boost/mpl/not.hpp" -#include "boost/mpl/or.hpp" +#include "boost/mpl/and.hpp" #include "boost/mpl/begin_end.hpp" #include "boost/mpl/if.hpp" #include "boost/mpl/bool.hpp" @@ -41,8 +41,13 @@ namespace boost { namespace mpl { namespace aux { +// agurt, 11/jun/03: +// MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a +// 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector >' +// would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds +// the issue for most real-world cases template< typename T > struct is_sequence_impl - : or_< + : and_< identity< aux::has_tag > , identity< aux::has_begin > >