1 .. Metafunctions/Arithmetic Operations//divides |40
14 , typename T3 = |unspecified|
16 , typename T\ *n* = |unspecified|
20 typedef |unspecified| type;
28 Returns the quotient of its arguments.
36 #include <boost/mpl/divides.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 divides<c1,\ |...|\ c\ *n*\>::type r;
72 ``c2::value != 0``, |...| ``cn::value != 0``.
80 typeof(c1::value / c2::value)
81 , ( c1::value / c2::value )
84 typedef divides<c,c3,\ |...|\c\ *n*\>::type r;
86 .. ..........................................................................
90 typedef divides<c1,\ |...|\ c\ *n*\> r;
96 ``c2::value != 0``, |...| ``cn::value != 0``.
103 struct r : divides<c1,\ |...|\ c\ *n*\>::type {};
109 Amortized constant time.
117 typedef divides< int_<-10>, int_<3>, long_<1> >::type r;
118 BOOST_MPL_ASSERT_RELATION( r::value, ==, -3 );
119 BOOST_MPL_ASSERT(( is_same< r::value_type, long > ));
125 |Arithmetic Operations|, |Numeric Metafunction|, |numeric_cast|, |times|, |modulus|, |plus|
128 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
129 Distributed under the Boost Software License, Version 1.0. (See accompanying
130 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)