-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.cpp
47 lines (40 loc) · 1.31 KB
/
test.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include <iostream>
#include <list>
#include <unordered_set>
#include <complex>
#include "concepts.h"
using namespace Concepts;
using namespace std;
Common{...Args} void common(Args... args) {}
Compatible{A, B} void compatible(A,B){}
Incrementable{I} void incr(I){}
#define PRINT(...) std::cout << #__VA_ARGS__ ":\t" << __VA_ARGS__ << std::endl
struct Foo{};
int main() {
common(3, std::complex<double>());
compatible(3, 3.0f);
std::cout << std::boolalpha;
PRINT(Incrementable<int>);
PRINT(Bitmask<int>);
PRINT(Bitmask<float>);
PRINT(ShiftableBitmask<int>);
PRINT(Ordered<int, float>);
PRINT(Ordered<complex<float>>);
PRINT(Arithmetic<int>);
PRINT(Arithmetic<complex<float>>);
PRINT(CompatibleArithmetic<complex<float>, float>);
PRINT(CompatibleArithmetic<float, complex<float>>);
PRINT(Swappable<int>);
PRINT(ValueSwappable<int*>);
PRINT(RandomAccessIterator<int*>);
PRINT(BidirectionnalIterator<list<int>::iterator>);
PRINT(RandomAccessIterator<list<int>::iterator>);
PRINT(ForwardIterator<unordered_set<int>::iterator>);
PRINT(BidirectionnalIterator<unordered_set<int>::iterator>);
PRINT(ReversibleContainer<list<int>>);
PRINT(Container<unordered_set<int>>);
PRINT(ReversibleContainer<unordered_set<int>>);
PRINT(Container<int[]>);
PRINT(Allocator<allocator<int>>);
return 0;
}