mirror of
https://github.com/dlang/phobos.git
synced 2025-04-28 06:00:35 +03:00
Move various deprecations along.
This commit is contained in:
parent
9749958019
commit
efd6ea0cbf
13 changed files with 28 additions and 260 deletions
|
@ -460,7 +460,6 @@ unittest
|
|||
}
|
||||
enforceEx!E1(s);
|
||||
enforceEx!E2(s);
|
||||
enforceEx!E3(s, ""); // deprecated
|
||||
}
|
||||
|
||||
/++
|
||||
|
@ -538,18 +537,6 @@ template enforceEx(E)
|
|||
}
|
||||
}
|
||||
|
||||
// Explicitly undocumented. It will be removed in November 2013.
|
||||
deprecated("Please use the version of enforceEx which takes an exception that constructs with new E(msg, file, line).")
|
||||
template enforceEx(E)
|
||||
if (is(typeof(new E(""))) && !is(typeof(new E("", __FILE__, __LINE__))) && !is(typeof(new E(__FILE__, __LINE__))))
|
||||
{
|
||||
T enforceEx(T)(T value, lazy string msg = "")
|
||||
{
|
||||
if (!value) throw new E(msg);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
unittest
|
||||
{
|
||||
assertNotThrown(enforceEx!Exception(true));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue