Add two values, clamping to the type's range on overflow.
Synopsis
Declared in <folly/ConstexprMath.h>
template<typename T>
constexpr
T
constexpr_add_overflow_clamped(
T a,
T b);
Return Value
The sum of a and b, clamped to the range of T on overflow.
Parameters
Name |
Description |
a |
The first addend. |
b |
The second addend. |
Created with MrDocs