1 .. Metafunctions/Arithmetic Operations//times |30
14 , typename T3 = |unspecified|
16 , typename T\ *n* = |unspecified|
20 typedef |unspecified| type;
28 Returns the product of its arguments.
36 #include <boost/mpl/times.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 times<c1,\ |...|\ c\ *n*\>::type r;
77 typeof(c1::value * c2::value)
78 , ( c1::value * c2::value )
81 typedef times<c,c3,\ |...|\c\ *n*\>::type r;
83 .. ..........................................................................
88 typedef times<c1,\ |...|\ c\ *n*\> r;
98 struct r : times<c1,\ |...|\ c\ *n*\>::type {};
104 Amortized constant time.
112 typedef times< int_<-10>, int_<3>, long_<1> >::type r;
113 BOOST_MPL_ASSERT_RELATION( r::value, ==, -30 );
114 BOOST_MPL_ASSERT(( is_same< r::value_type, long > ));
120 |Metafunctions|, |Numeric Metafunction|, |numeric_cast|, |divides|, |modulus|, |plus|
123 .. copyright:: Copyright © 2001-2009 Aleksey Gurtovoy and David Abrahams
124 Distributed under the Boost Software License, Version 1.0. (See accompanying
125 file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)