SHARE
TWEET

Untitled

a guest Jan 18th, 2012 18 Never
  1. // is_signed
  2.  
  3. template <class _Tp, bool = is_integral<_Tp>::value>
  4. struct ___is_signed : public integral_constant<bool, _Tp(-1) < _Tp(0)> {};
  5.  
  6. template <class _Tp>
  7. struct ___is_signed<_Tp, false> : public true_type {};  // floating point
  8.  
  9. template <class _Tp, bool = is_arithmetic<_Tp>::value>
  10. struct __is_signed : public ___is_signed<_Tp> {};
  11.  
  12. template <class _Tp> struct __is_signed<_Tp, false> : public false_type {};
  13.  
  14. template <class _Tp> struct is_signed : public __is_signed<_Tp> {};
RAW Paste Data
Top