1 %module cpp14_binary_integer_literals
2 
3 // Tests are designed so that code compiles with C++98 compilers
4 
5 %{
6 #if __cplusplus >= 201402L
7 #define CPP14 1
8 #endif
9 %}
10 
11 int b1 = 0b1;
12 int b2 = 0b10;
13 long b3 = 0b11l;
14 unsigned long b4 = 0b100ul;
15 unsigned long b5 = 0B101UL;
16 
17 %{
18 #if defined(CPP14)
19 int b1 = 0b1;
20 int b2 = 0b10;
21 long b3 = 0b11l;
22 unsigned long b4 = 0b100ul;
23 unsigned long b5 = 0B101UL;
24 #else
25 int b1 = 1;
26 int b2 = 2;
27 long b3 = 3;
28 unsigned long b4 = 4;
29 unsigned long b5 = 5;
30 #endif
31 %}
32