File indexing completed on 2025-01-18 09:41:38
0001
0002 #ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
0003 #define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include <boost/mpl/if.hpp>
0018 #include <boost/mpl/bool.hpp>
0019 #include <boost/mpl/aux_/type_wrapper.hpp>
0020 #include <boost/mpl/aux_/yes_no.hpp>
0021
0022 #include <boost/type_traits/is_reference.hpp>
0023
0024 namespace boost { namespace mpl { namespace aux {
0025
0026 template< typename T > struct is_class_helper
0027 {
0028 typedef int (T::* type)();
0029 };
0030
0031
0032
0033 template< typename T >
0034 struct msvc_is_class_impl
0035 {
0036 template< typename U>
0037 static yes_tag test(type_wrapper<U>*, is_class_helper<U>::type = 0);
0038 static no_tag test(void const volatile*, ...);
0039
0040 enum { value = sizeof(test((type_wrapper<T>*)0)) == sizeof(yes_tag) };
0041 typedef bool_<value> type;
0042 };
0043
0044
0045
0046 template< typename T >
0047 struct msvc_is_class
0048 : if_<
0049 is_reference<T>
0050 , false_
0051 , msvc_is_class_impl<T>
0052 >::type
0053 {
0054 };
0055
0056 }}}
0057
0058 #endif