模板实现判断一个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;

上一篇:前端文本溢出问题


下一篇:CSS ul 横向滑动并超出屏幕可滑动