has_rebind.hpp
Go to the documentation of this file.
1 
2 #ifndef BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
3 #define BOOST_MPL_AUX_HAS_REBIND_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: has_rebind.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 
20 
21 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
22 # include <boost/mpl/has_xxx.hpp>
23 #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
24 # include <boost/mpl/has_xxx.hpp>
25 # include <boost/mpl/if.hpp>
26 # include <boost/mpl/bool.hpp>
28 #elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
29 # include <boost/mpl/if.hpp>
30 # include <boost/mpl/bool.hpp>
31 # include <boost/mpl/aux_/yes_no.hpp>
34 #else
36 # include <boost/mpl/aux_/yes_no.hpp>
38 #endif
39 
40 namespace boost { namespace mpl { namespace aux {
41 
42 #if BOOST_WORKAROUND(__EDG_VERSION__, <= 244) && !defined(BOOST_INTEL_CXX_VERSION)
43 
44 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind, rebind, false)
45 
46 #elif BOOST_WORKAROUND(BOOST_MSVC, < 1300)
47 
48 BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_rebind_impl, rebind, false)
49 
50 template< typename T >
51 struct has_rebind
52  : if_<
53  msvc_is_class<T>
54  , has_rebind_impl<T>
55  , bool_<false>
56  >::type
57 {
58 };
59 
60 #else // the rest
61 
62 template< typename T > struct has_rebind_tag {};
63 no_tag operator|(has_rebind_tag<int>, void const volatile*);
64 
65 # if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610))
66 template< typename T >
67 struct has_rebind
68 {
69  static has_rebind_tag<T>* get();
70  BOOST_STATIC_CONSTANT(bool, value =
71  sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
72  );
73 };
74 # else // __BORLANDC__
75 template< typename T >
76 struct has_rebind_impl
77 {
78  static T* get();
79  BOOST_STATIC_CONSTANT(bool, value =
80  sizeof(has_rebind_tag<int>() | get()) == sizeof(yes_tag)
81  );
82 };
83 
84 template< typename T >
85 struct has_rebind
86  : if_<
87  is_class<T>
88  , has_rebind_impl<T>
89  , bool_<false>
90  >::type
91 {
92 };
93 # endif // __BORLANDC__
94 
95 #endif
96 
97 }}}
98 
99 #endif // BOOST_MPL_AUX_HAS_REBIND_HPP_INCLUDED
BOOST_STATIC_CONSTANT
#define BOOST_STATIC_CONSTANT(type, assignment)
Definition: suffix.hpp:394
T
T
Definition: mem_fn_cc.hpp:25
boost::mpl::aux::has_rebind_tag
Definition: has_rebind.hpp:62
boost::type
Definition: type.hpp:14
bool.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::mpl::aux::has_rebind
Definition: has_rebind.hpp:67
boost::mpl::aux::operator|
no_tag operator|(has_rebind_tag< int >, void const volatile *)
type_wrapper.hpp
workaround.hpp
is_class.hpp
msvc.hpp
yes_no.hpp
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF
#define BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(trait, name, default_)
Definition: has_xxx.hpp:236
intel.hpp
has_xxx.hpp
boost::mpl::aux::has_rebind::get
static has_rebind_tag< T > * get()
boost::mpl::aux::yes_tag
char(& yes_tag)[2]
Definition: yes_no.hpp:26
boost::mpl::if_
Definition: dmc/basic_bind.hpp:374
boost::get
BOOST_DEDUCED_TYPENAME optional< T >::reference_const_type get(optional< T > const &opt)
Definition: optional/optional.hpp:1061
static_constant.hpp
msvc_is_class.hpp
bool_
Definition: mpl/bool.hpp:23
boost::mpl::aux::has_rebind::BOOST_STATIC_CONSTANT
BOOST_STATIC_CONSTANT(bool, value=sizeof(has_rebind_tag< int >()|get())==sizeof(yes_tag))
if.hpp
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:39:49