sl@0: sl@0: #ifndef BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED sl@0: #define BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED sl@0: sl@0: // Copyright Aleksey Gurtovoy 2002-2004 sl@0: // sl@0: // Distributed under the Boost Software License, Version 1.0. sl@0: // (See accompanying file LICENSE_1_0.txt or copy at sl@0: // http://www.boost.org/LICENSE_1_0.txt) sl@0: // sl@0: // See http://www.boost.org/libs/mpl for documentation. sl@0: sl@0: // $Source: /cvsroot/boost/boost/boost/mpl/is_sequence.hpp,v $ sl@0: // $Date: 2005/08/25 16:27:21 $ sl@0: // $Revision: 1.9 $ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) sl@0: # include sl@0: #elif BOOST_WORKAROUND(BOOST_MSVC, == 1300) sl@0: # include sl@0: #endif sl@0: sl@0: #include sl@0: sl@0: namespace boost { namespace mpl { sl@0: sl@0: #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) sl@0: sl@0: namespace aux { sl@0: sl@0: // agurt, 11/jun/03: sl@0: // MSVC 6.5/7.0 fails if 'has_begin' is instantiated on a class type that has a sl@0: // 'begin' member that doesn't name a type; e.g. 'has_begin< std::vector >' sl@0: // would fail; requiring 'T' to have _both_ 'tag' and 'begin' members workarounds sl@0: // the issue for most real-world cases sl@0: template< typename T > struct is_sequence_impl sl@0: : and_< sl@0: identity< aux::has_tag > sl@0: , identity< aux::has_begin > sl@0: > sl@0: { sl@0: }; sl@0: sl@0: } // namespace aux sl@0: sl@0: template< sl@0: typename BOOST_MPL_AUX_NA_PARAM(T) sl@0: > sl@0: struct is_sequence sl@0: : if_< sl@0: #if BOOST_WORKAROUND(BOOST_MSVC, < 1300) sl@0: aux::msvc_is_class sl@0: #else sl@0: boost::is_class sl@0: #endif sl@0: , aux::is_sequence_impl sl@0: , bool_ sl@0: >::type sl@0: { sl@0: BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) sl@0: }; sl@0: sl@0: #elif defined(BOOST_MPL_CFG_NO_HAS_XXX) sl@0: sl@0: template< sl@0: typename BOOST_MPL_AUX_NA_PARAM(T) sl@0: > sl@0: struct is_sequence sl@0: : bool_ sl@0: { sl@0: }; sl@0: sl@0: #else sl@0: sl@0: template< sl@0: typename BOOST_MPL_AUX_NA_PARAM(T) sl@0: > sl@0: struct is_sequence sl@0: : not_< is_same< typename begin::type, void_ > > sl@0: { sl@0: BOOST_MPL_AUX_LAMBDA_SUPPORT(1, is_sequence, (T)) sl@0: }; sl@0: sl@0: #endif // BOOST_MSVC sl@0: sl@0: #if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) sl@0: template<> struct is_sequence sl@0: : bool_ sl@0: { sl@0: }; sl@0: #endif sl@0: sl@0: BOOST_MPL_AUX_NA_SPEC_NO_ETI(1, is_sequence) sl@0: sl@0: }} sl@0: sl@0: #endif // BOOST_MPL_IS_SEQUENCE_HPP_INCLUDED