Chris@16: Chris@16: #ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED Chris@16: #define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED Chris@16: Chris@16: // Copyright Aleksey Gurtovoy 2002-2004 Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // (See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: // Chris@16: // See http://www.boost.org/libs/mpl for documentation. Chris@16: Chris@101: // $Id$ Chris@101: // $Date$ Chris@101: // $Revision$ Chris@16: Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: #include Chris@16: Chris@16: #include Chris@16: Chris@16: namespace boost { namespace mpl { namespace aux { Chris@16: Chris@16: template< typename T > struct is_class_helper Chris@16: { Chris@16: typedef int (T::* type)(); Chris@16: }; Chris@16: Chris@16: // MSVC 6.x-specific lightweight 'is_class' implementation; Chris@16: // Distinguishing feature: does not instantiate the type being tested. Chris@16: template< typename T > Chris@16: struct msvc_is_class_impl Chris@16: { Chris@16: template< typename U> Chris@16: static yes_tag test(type_wrapper*, /*typename*/ is_class_helper::type = 0); Chris@16: static no_tag test(void const volatile*, ...); Chris@16: Chris@16: enum { value = sizeof(test((type_wrapper*)0)) == sizeof(yes_tag) }; Chris@16: typedef bool_ type; Chris@16: }; Chris@16: Chris@16: // agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in Chris@16: // complex metaprograms Chris@16: template< typename T > Chris@16: struct msvc_is_class Chris@16: : if_< Chris@16: is_reference Chris@16: , false_ Chris@16: , msvc_is_class_impl Chris@16: >::type Chris@16: { Chris@16: }; Chris@16: Chris@16: }}} Chris@16: Chris@16: #endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED