promotes_arg.hpp
Go to the documentation of this file.
1 /* Copyright 2003-2014 Joaquin M Lopez Munoz.
2  * Distributed under the Boost Software License, Version 1.0.
3  * (See accompanying file LICENSE_1_0.txt or copy at
4  * http://www.boost.org/LICENSE_1_0.txt)
5  *
6  * See http://www.boost.org/libs/multi_index for library home page.
7  */
8 
9 #ifndef BOOST_MULTI_INDEX_DETAIL_PROMOTES_ARG_HPP
10 #define BOOST_MULTI_INDEX_DETAIL_PROMOTES_ARG_HPP
11 
12 #if defined(_MSC_VER)
13 #pragma once
14 #endif
15 
16 #include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
17 #include <boost/mpl/bool.hpp>
19 
20 /* Metafunctions to check if f(arg1,arg2) promotes either arg1 to the type of
21  * arg2 or viceversa. By default, (i.e. if it cannot be determined), no
22  * promotion is assumed.
23  */
24 
25 #if !defined(BOOST_IS_CONVERTIBLE)
26 
27 namespace boost{
28 
29 namespace multi_index{
30 
31 namespace detail{
32 
33 template<typename F,typename Arg1,typename Arg2>
35 
36 template<typename F,typename Arg1,typename Arg2>
38 
39 } /* namespace multi_index::detail */
40 
41 } /* namespace multi_index */
42 
43 } /* namespace boost */
44 
45 #else
46 
47 #include <boost/mpl/and.hpp>
48 #include <boost/mpl/not.hpp>
51 
52 namespace boost{
53 
54 namespace multi_index{
55 
56 namespace detail{
57 
58 template<typename F,typename Arg1,typename Arg2>
59 struct promotes_1st_arg:
60  mpl::and_<
61  mpl::not_<is_transparent<F,Arg1,Arg2> >,
62  is_convertible<const Arg1,Arg2>,
63  is_transparent<F,Arg2,Arg2>
64  >
65 {};
66 
67 template<typename F,typename Arg1,typename Arg2>
68 struct promotes_2nd_arg:
69  mpl::and_<
70  mpl::not_<is_transparent<F,Arg1,Arg2> >,
71  is_convertible<const Arg2,Arg1>,
72  is_transparent<F,Arg1,Arg1>
73  >
74 {};
75 
76 } /* namespace multi_index::detail */
77 
78 } /* namespace multi_index */
79 
80 } /* namespace boost */
81 
82 #endif /* defined(BOOST_IS_CONVERTIBLE) */
83 #endif
false_
bool_< false > false_
Definition: bool_fwd.hpp:25
is_convertible.hpp
config.hpp
bool.hpp
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
is_transparent.hpp
boost::foreach_detail_::and_
boost::mpl::and_< Bool1, Bool2 > * and_(Bool1 *, Bool2 *)
Definition: foreach.hpp:203
and.hpp
intrinsics.hpp
boost::multi_index::detail::promotes_1st_arg
Definition: promotes_arg.hpp:34
boost::multi_index::detail::promotes_2nd_arg
Definition: promotes_arg.hpp:37
not.hpp


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