# multiplies

### Synopsis

    template<
          typename T1
        , typename T2
        , typename T3 = integral_c<int,1>
        , ...
        , typename Tn = integral_c<int,1>
        >
    struct multiplies
    {
        typedef unspecified type;
    };

### Description

Returns the product of its arguments [1].

### Definition

    #include "boost/mpl/multiplies.hpp"

### Parameters

Parameter | Requirement | Description
--- | --- | ---
`T1, T2, .., Tn` | A model of Integral Constant |

### Expression semantics

Expression | Expression type | Precondition | Semantics | Postcondition
--- | --- | --- | --- | ---
`typedef multiplies<t1,t2,..,tn>::type product;` | A model of Integral Constant |  | Equivalent to `typedef integral_c<typeof(t1::value * t2::value .. * tn::value), t1::value * t2::value .. * tn::value > product;` |

### Complexity

Amortized constant time.

### Example

    typedef multiplies< integral_c<short,-1>, integral_c<long,10> >::type product;
    BOOST_STATIC_ASSERT(product::value == -10));
    BOOST_MPL_ASSERT_IS_SAME(product::value_type, long);

### Notes

[1] The `multiplies` metafunction can be (and is expected to be) specialized by user to work on user-defined types that do not satisfy the Integral Constant requirements. The requirements listed here are the ones imposed by the default implementation.

### See also

Metafunctions, `divides`, `modulus`, `plus`, `minus`, `negate`

Table of Contents
Last edited March 10, 2003 6:31 am