projects
/
cython.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Remove trailing whitespace.
[cython.git]
/
tests
/
run
/
cpp_operators_helper.h
1
#define UN_OP(op) const char* operator op () { return "unary "#op; }
2
#define POST_UN_OP(op) const char* operator op (int x) { return "post "#op; }
3
#define BIN_OP(op) const char* operator op (int x) { return "binary "#op; }
4
5
#define COMMA ,
6
7
class TestOps {
8
9
public:
10
11
UN_OP(-);
12
UN_OP(+);
13
UN_OP(*);
14
UN_OP(~);
15
UN_OP(!);
16
UN_OP(&);
17
18
UN_OP(++);
19
UN_OP(--);
20
POST_UN_OP(++);
21
POST_UN_OP(--);
22
23
BIN_OP(+);
24
BIN_OP(-);
25
BIN_OP(*);
26
BIN_OP(/);
27
BIN_OP(%);
28
29
BIN_OP(<<);
30
BIN_OP(>>);
31
32
BIN_OP(|);
33
BIN_OP(&);
34
BIN_OP(^);
35
BIN_OP(COMMA);
36
37
BIN_OP(==);
38
BIN_OP(!=);
39
BIN_OP(<=);
40
BIN_OP(<);
41
BIN_OP(>=);
42
BIN_OP(>);
43
44
BIN_OP([]);
45
BIN_OP(());
46
47
};