promote_integral< T, PromoteUnsignedToUnsigned, UseCheckedInteger, IsIntegral > Class Template Reference

Meta-function to define an integral type with size than is (roughly) twice the bit size of T. More...

`#include <promote_integral.hpp>`

class boost::gil::promote_integral< T, PromoteUnsignedToUnsigned, UseCheckedInteger, IsIntegral >

Meta-function to define an integral type with size than is (roughly) twice the bit size of T.

This meta-function tries to promote the fundamental integral type T to a another integral type with size (roughly) twice the bit size of T.

To do this, two times the bit size of T is tested against the bit sizes of: short, int, long, boost::long_long_type, boost::int128_t and the one that first matches is chosen.

For unsigned types the bit size of T is tested against the bit sizes of the types above, if T is promoted to a signed type, or the bit sizes of unsigned short, unsigned int, unsigned long, std::size_t, boost::ulong_long_type, boost::uint128_t if T is promoted to an unsigned type.

By default an unsigned type is promoted to a signed type. This behavior is controlled by the PromoteUnsignedToUnsigned boolean template parameter, whose default value is "false". To promote an unsigned type to an unsigned type set the value of this template parameter to "true".

Finally, if the passed type is either a floating-point type or a user-defined type it is returned as is.

- Note
- boost::long_long_type and boost::ulong_long_type are considered only if the macro BOOST_HAS_LONG_LONG is defined

The documentation for this class was generated from the following file:

Generated on Wed Aug 1 2018 20:58:59 for Generic Image Library by doxygen 1.8.6