Supplemental changes for 3235 & 6714

This commit is contained in:
k-hara 2011-12-31 14:39:05 +09:00
parent 187ee7133d
commit d493815bfe
3 changed files with 7 additions and 6 deletions

View file

@ -365,8 +365,9 @@ T enforce(T, string file = __FILE__, size_t line = __LINE__)
The whole safety and purity are inferred from $(D Dg)'s safety and purity.
+/
T enforce(T, Dg : void delegate(), string file = __FILE__, size_t line = __LINE__)
T enforce(T, Dg, string file = __FILE__, size_t line = __LINE__)
(T value, scope Dg dg)
if (is(Dg : void delegate()) || is(Dg : void function()))
{
if (!value) dg();
return value;