其他分享
首页 > 其他分享> > 模板实现判断一个int是否是一个有效的int

模板实现判断一个int是否是一个有效的int

作者:互联网

enum RangeConstraint {
  RANGE_VALID = 0x0,  // Value can be represented by the destination type.
  RANGE_UNDERFLOW = 0x1,  // Value would overflow.
  RANGE_OVERFLOW = 0x2,  // Value would underflow.
  RANGE_INVALID = RANGE_UNDERFLOW | RANGE_OVERFLOW  // Invalid (i.e. NaN).
};

   base::CheckedNumeric<int> nSize = nLen;

标签:would,int,是否是,Value,UNDERFLOW,RANGE,OVERFLOW,模板
来源: https://www.cnblogs.com/hshy/p/15747340.html