msvc_is_class.hpp
Go to the documentation of this file.
1 
2 #ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
3 #define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
4 
5 // Copyright Aleksey Gurtovoy 2002-2004
6 //
7 // Distributed under the Boost Software License, Version 1.0.
8 // (See accompanying file LICENSE_1_0.txt or copy at
9 // http://www.boost.org/LICENSE_1_0.txt)
10 //
11 // See http://www.boost.org/libs/mpl for documentation.
12 
13 // $Id: msvc_is_class.hpp 13472 2017-08-22 07:53:44Z richean $
14 // $Date: 2017-08-22 09:53:44 +0200 (Di, 22 Aug 2017) $
15 // $Revision: 13472 $
16 
17 #include <boost/mpl/if.hpp>
18 #include <boost/mpl/bool.hpp>
21 
23 
24 namespace boost { namespace mpl { namespace aux {
25 
26 template< typename T > struct is_class_helper
27 {
28  typedef int (T::* type)();
29 };
30 
31 // MSVC 6.x-specific lightweight 'is_class' implementation;
32 // Distinguishing feature: does not instantiate the type being tested.
33 template< typename T >
35 {
36  template< typename U>
37  static yes_tag test(type_wrapper<U>*, /*typename*/ is_class_helper<U>::type = 0);
38  static no_tag test(void const volatile*, ...);
39 
40  enum { value = sizeof(test((type_wrapper<T>*)0)) == sizeof(yes_tag) };
41  typedef bool_<value> type;
42 };
43 
44 // agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in
45 // complex metaprograms
46 template< typename T >
48  : if_<
49  is_reference<T>
50  , false_
51  , msvc_is_class_impl<T>
52  >::type
53 {
54 };
55 
56 }}}
57 
58 #endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
boost::mpl::aux::msvc_is_class_impl::type
bool_< value > type
Definition: msvc_is_class.hpp:41
T
T
Definition: mem_fn_cc.hpp:25
boost::type
Definition: type.hpp:14
bool.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
is_reference.hpp
type_wrapper.hpp
boost::mpl::aux::is_class_helper
Definition: msvc_is_class.hpp:26
yes_no.hpp
boost::mpl::aux::msvc_is_class_impl
Definition: msvc_is_class.hpp:34
boost::mpl::aux::yes_tag
char(& yes_tag)[2]
Definition: yes_no.hpp:26
boost::mpl::aux::msvc_is_class_impl::value
@ value
Definition: msvc_is_class.hpp:40
boost::mpl::if_
Definition: dmc/basic_bind.hpp:374
boost::mpl::aux::type_wrapper
Definition: type_wrapper.hpp:22
boost::mpl::aux::msvc_is_class_impl::test
static yes_tag test(type_wrapper< U > *, is_class_helper< U >::type=0)
bool_
Definition: mpl/bool.hpp:23
if.hpp
boost::mpl::aux::msvc_is_class
Definition: msvc_is_class.hpp:47
boost::mpl::aux::no_tag
char(& no_tag)[1]
Definition: yes_no.hpp:25


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 03:44:22