MuldivLimits< num, den, ValType > Struct Template Reference

Obtain limits for a muldiv template calculation. More...

#include <muldiv.h>

Static Public Member Functions

static constexpr ValType overflow ()
 Get the value representing overflow for the given ValType. More...
 
static constexpr ValType maxValue ()
 Get the maximum value which can be used for a muldiv calculation without overflowing. More...
 

Detailed Description

template<uint64_t num, uint64_t den, typename ValType>
struct MuldivLimits< num, den, ValType >

Obtain limits for a muldiv template calculation.

Template Parameters
num
den
ValType

Member Function Documentation

◆ maxValue()

template<uint64_t num, uint64_t den, typename ValType >
static constexpr ValType MuldivLimits< num, den, ValType >::maxValue ( )
inlinestaticconstexpr

Get the maximum value which can be used for a muldiv calculation without overflowing.

Return values
ValTypeValues greater than this will return overflow()

◆ overflow()

template<uint64_t num, uint64_t den, typename ValType >
static constexpr ValType MuldivLimits< num, den, ValType >::overflow ( )
inlinestaticconstexpr

Get the value representing overflow for the given ValType.

Return values
ValType
Note
Value equivalent to ValType(-1)

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