negate.hpp
Go to the documentation of this file.
1 
2 #ifndef BOOST_MPL_NEGATE_HPP_INCLUDED
3 #define BOOST_MPL_NEGATE_HPP_INCLUDED
4 
5 // Copyright Aleksey Gurtovoy 2000-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: negate.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/integral_c.hpp>
24 
25 namespace boost { namespace mpl {
26 
27 template< typename Tag > struct negate_impl;
28 
29 template< typename T > struct negate_tag
30 {
31  typedef typename T::tag type;
32 };
33 
34 template<
35  typename BOOST_MPL_AUX_NA_PARAM(N)
36  >
37 struct negate
38 #if !defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
39  : negate_impl<
40  typename negate_tag<N>::type
41  >::template apply<N>::type
42 #else
43  : aux::msvc_eti_base< typename apply_wrap1<
44  negate_impl< typename negate_tag<N>::type >
45  , N
46  >::type >::type
47 #endif
48 {
50 };
51 
53 
54 
55 #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
56 namespace aux {
57 template< typename T, T n > struct negate_wknd
58 {
59  BOOST_STATIC_CONSTANT(T, value = -n);
60  typedef integral_c<T,value> type;
61 };
62 }
63 #endif
64 
65 template<>
67 {
68 #if defined(BOOST_MPL_CFG_NO_NESTED_VALUE_ARITHMETIC)
69  template< typename N > struct apply
70  : aux::negate_wknd< typename N::value_type, N::value >
71 #else
72  template< typename N > struct apply
73  : integral_c< typename N::value_type, (-N::value) >
74 #endif
75  {
76  };
77 };
78 
79 }}
80 
81 #endif // BOOST_MPL_NEGATE_HPP_INCLUDED
BOOST_STATIC_CONSTANT
#define BOOST_STATIC_CONSTANT(type, assignment)
Definition: suffix.hpp:394
integral.hpp
T
T
Definition: mem_fn_cc.hpp:25
BOOST_MPL_AUX_NA_PARAM
#define BOOST_MPL_AUX_NA_PARAM(param)
Definition: na_spec.hpp:152
integral_c_tag
Definition: integral_c_tag.hpp:22
na_spec.hpp
boost::type
Definition: type.hpp:14
template
string template
boost::mpl::negate_impl
Definition: negate.hpp:27
BOOST_MPL_AUX_NA_SPEC
#define BOOST_MPL_AUX_NA_SPEC(i, name)
Definition: na_spec.hpp:161
boost
BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE.
boost::mpl::negate_tag
Definition: negate.hpp:29
BOOST_MPL_AUX_LAMBDA_SUPPORT
#define BOOST_MPL_AUX_LAMBDA_SUPPORT(i, name, params)
Definition: lambda_support.hpp:22
boost::mpl::negate_tag::type
T::tag type
Definition: negate.hpp:31
eti.hpp
boost::foreach::tag
boost_foreach_argument_dependent_lookup_hack tag
Definition: foreach_fwd.hpp:31
msvc_eti_base.hpp
boost::mpl::apply
primary template (not a specialization!)
Definition: aux_/preprocessed/bcc/apply.hpp:163
integral_c.hpp
integral_c
Definition: integral_c_fwd.hpp:26
boost::mpl::aux::msvc_eti_base
Definition: msvc_eti_base.hpp:55
static_constant.hpp
lambda_support.hpp
boost::mpl::negate
Definition: negate.hpp:37


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