On Fri, 27 Aug 2010 12:18:19 -0500, SHOO <[email protected]> wrote:
You can use:
auto sw = new StopWatch(autoStart);
AutoStart.yes is redundant expression.
And, it is impossible to make default behavior of the StopWatch
AutoStart.yes.
This comes from that StopWatch is a struct.
struct cannot run default behavior.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos
How about a stopWatch function that returns a StopWatch struct, something
like the std.range module does:
StopWatch stopWatch( AutoStart as = AutoStart.Yes )
{
return StopWatch( as );
}
auto watch = stopWatch();
Or it would be too confusing?
--
Yao G.
_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos