Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void main()
- {
- void f() pure
- {
- }
- enforce(100, &f);
- }
- T enforce(T, DG)(T v, DG dg) pure
- if (is(DG == void delegate() pure))
- {
- dg();
- return v;
- }
- T enforce(T, DG)(T v, DG dg)
- if (is(DG == void delegate()))
- {
- dg();
- return v;
- }
Add Comment
Please, Sign In to add comment