1 struct A 2 { 3 bool isDisposed() @property 4 { 5 return true; 6 } 7 8 void dispose() 9 { 10 } 11 } 12 13 class B 14 { 15 bool isDisposed() @property 16 { 17 return true; 18 } 19 20 void dispose() 21 { 22 } 23 } 24 25 interface C 26 { 27 bool isDisposed() @property; 28 void dispose(); 29 } 30 31 static assert(isCancelable!A); 32 static assert(isCancelable!B); 33 static assert(isCancelable!C);
Tests if something is a Cancelable