isObserver

Tests if something is Observer.

template isObserver (
T
E
) {
enum bool isObserver;
}

Examples

1 struct TestObserver
2 {
3     void put(int n)
4     {
5     }
6 
7     void completed()
8     {
9     }
10 
11     void failure(Exception e)
12     {
13     }
14 }
15 
16 static assert(isObserver!(TestObserver, int));