mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 22:21:09 +03:00
Supplemental changes for 3235 & 6714
This commit is contained in:
parent
187ee7133d
commit
d493815bfe
3 changed files with 7 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue