Struct AdditionOverFlow

Synopsis

#include <include/EASTL/ratio.h>

template <intmax_t X, intmax_t Y>
struct AdditionOverFlow

Description

No description yet.

Source

Lines 89-95 in include/EASTL/ratio.h.

template <intmax_t X, intmax_t Y>
struct AdditionOverFlow
{
    static const bool c1 = (X <= 0 && 0 <= Y) || (Y < 0 && 0 < X);   // True if digits do not have the same sign. 
    static const bool c2 = EASTL_RATIO_ABS(Y) <= INTMAX_MAX - EASTL_RATIO_ABS(X);
    static const bool value = c1 || c2;
};





Add Discussion as Guest

Log in