PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

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