/prelude/terse.hpp

http://github.com/Eelis/geordi · C++ Header · 80 lines · 65 code · 5 blank · 10 comment · 0 complexity · 909010a66c9c232d7da7e9f0be6fe747 MD5 · raw file

  1. // Keywords:
  2. #define au auto
  3. #define brk break
  4. #define cat catch
  5. #define cls class
  6. #define co const
  7. #define cex constexpr
  8. #define ccast const_cast
  9. #define cnt continue
  10. #define dtp decltype
  11. #define def default
  12. #define del delete
  13. #define dcast dynamic_cast
  14. #define el else
  15. #define expl explicit
  16. #define expo export
  17. #define ext extern
  18. #define ff false // We could define tt/ff as constants, but then they'd be lvalues.
  19. #define inl inline
  20. #define mut mutable
  21. #define ns namespace
  22. #define op operator
  23. #define pvt private
  24. #define prt protected
  25. #define pub public
  26. #define reg register
  27. #define rcast reinterpret_cast
  28. #define ret return
  29. #define sgn signed
  30. #define szof sizeof
  31. #define sass static_assert
  32. #define scast static_cast
  33. #define stc static
  34. #define st struct
  35. #define sw switch
  36. #define tmp template
  37. #define tt true
  38. #define tpd typedef
  39. #define tpi typeid
  40. #define tpn typename
  41. #define uni union
  42. #define use using
  43. #define vrt virtual
  44. #define vol volatile
  45. #define wh while
  46. typedef char ch;
  47. typedef float flt;
  48. typedef double dub;
  49. typedef long double ldub;
  50. typedef unsigned char uchar;
  51. typedef unsigned int uint;
  52. typedef unsigned long ulong;
  53. typedef unsigned short ushort;
  54. // C++0x:
  55. // typedef char16_t ch16
  56. // typedef char32_t ch32
  57. // typedef long long llong;
  58. // typedef unsigned long long ullong;
  59. // Stdlib:
  60. #define ass assert
  61. #define iter iterator
  62. typedef ::std::string str;
  63. // The following are to be replaced with template aliases at some point.
  64. #define vec ::std::vector
  65. #define umap ::std::unordered_map
  66. #define uset ::std::unordered_set
  67. #define numlim ::std::numeric_limits
  68. // Boost:
  69. #define opt ::boost::optional
  70. #define lcast ::boost::lexical_cast
  71. #define foreach BOOST_FOREACH
  72. using boost::next;
  73. using boost::prior;
  74. // Misc:
  75. #define M int main ()