Fixed: dmd die of the generation of the document.

This commit is contained in:
SHOO 2010-08-22 15:21:51 +00:00
parent 08af0f5500
commit cf4ff42933

View file

@ -841,24 +841,24 @@ unittest
} }
/******************************************************************************* @safe
{
/***************************************************************************
* Scope base measuring time. * Scope base measuring time.
* *
* When a value that is returned by this function is destroyed, FN will run. * When a value that is returned by this function is destroyed, FN will run.
* FN is unaly function that requires Ticks. * FN is unaly function that requires Ticks.
* *
* Excample: * Excample:
*------------------------------------------------------------------------------ *--------------------------------------------------------------------------
*writeln("benchmark start!"); *writeln("benchmark start!");
*{ *{
* auto mt = measureTime!((a){assert(a.seconds);}); * auto mt = measureTime!((a){assert(a.seconds);});
* doSomething(); * doSomething();
*} *}
*writeln("benchmark end!"); *writeln("benchmark end!");
*------------------------------------------------------------------------------ *--------------------------------------------------------------------------
*/ */
@safe
{
auto measureTime(alias func)() auto measureTime(alias func)()
if (isSafe!func) if (isSafe!func)
{ {