This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jan 18th, 2012  |  syntax: None  |  size: 0.49 KB  |  views: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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> {};
clone this paste RAW Paste Data