| Home | Libraries | People | FAQ | More

### promote

    template <class T>
    struct promote
    {
       typedef see-below type;
    };

type: If integral or floating point promotion can be applied to an rvalue of type `T`, then applies integral and floating point promotions to `T` and keeps cv-qualifiers of `T`, otherwise leaves `T` unchanged. See also integral_promotion and floating_point_promotion.

C++ Standard Reference: 4.5 except 4.5/3 (integral bit-field) and 4.6.

Header: `#include <boost/type_traits/promote.hpp>` or `#include <boost/type_traits.hpp>`

Table 1.17. Examples

Expression | Result Type
--- | ---
`promote<short volatile>::type` | `int volatile`
`promote<float const>::type` | `double const`
`promote<short&>::type` | `short&`