1 .. Metafunctions/Arithmetic Operations//minus |20
14 , typename T3 = |unspecified|
16 , typename T\ *n* = |unspecified|
20 typedef |unspecified| type;
28 Returns the difference of its arguments.
36 #include <boost/mpl/minus.hpp>
37 #include <boost/mpl/arithmetic.hpp>
43 |Numeric Metafunction|
49 +---------------+---------------------------+-----------------------------------------------+
50 | Parameter | Requirement | Description |
51 +===============+===========================+===============================================+
52 | |T1...Tn| | |Integral Constant| | Operation's arguments. |
53 +---------------+---------------------------+-----------------------------------------------+
55 |Note:| |numeric metafunction note| |-- end note|
61 For any |Integral Constant|\ s |c1...cn|:
66 typedef minus<c1,\ |...|\ c\ *n*\>::type r;
77 typeof(c1::value - c2::value)
78 , ( c1::value - c2::value )
81 typedef minus<c,c3,\ |...|\c\ *n*\>::type r;
83 .. ..........................................................................
87 typedef minus<c1,\ |...|\ c\ *n*\> r;
97 struct r : minus<c1,\ |...|\ c\ *n*\>::type {};
103 Amortized constant time.
111 typedef minus< int_<-10>, int_<3>, long_<1> >::type r;
112 BOOST_MPL_ASSERT_RELATION( r::value, ==, -14 );
113 BOOST_MPL_ASSERT(( is_same< r::value_type, long > ));
119 |Arithmetic Operations|, |Numeric Metafunction|, |numeric_cast|, |plus|, |negate|, |times|
122 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
123 Distributed under the Boost Software License, Version 1.0. (See accompanying
124 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)