Thread overview
[Issue 8411] core.time: No easy way to check if Duration is empty
October 15, 2016
https://issues.dlang.org/show_bug.cgi?id=8411

Andrei Alexandrescu <andrei@erdani.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |bootcamp
                 CC|                            |andrei@erdani.com

--
March 16, 2017
https://issues.dlang.org/show_bug.cgi?id=8411

Steven Schveighoffer <schveiguy@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |schveiguy@yahoo.com

--- Comment #3 from Steven Schveighoffer <schveiguy@yahoo.com> ---
I have a further, more difficult use case for this:

if(auto d = calculateSomeDuration())
{
   display(d);
}

This is not as easily worked around with the current API.

Adding opCast!bool was easy enough: https://github.com/dlang/druntime/pull/1793

--
March 17, 2017
https://issues.dlang.org/show_bug.cgi?id=8411

--- Comment #4 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/1caa1fc2c98c0fe06b8440f435cbac744fe7729c Fix issue 8411 - add opCast!bool support for Duration.

https://github.com/dlang/druntime/commit/827fb5ddc73e94b4a55bad0d7aabfa6401b52898 Merge pull request #1793 from schveiguy/addbooldur

Fix issue 8411 - add opCast!bool support for Duration.

--
March 22, 2017
https://issues.dlang.org/show_bug.cgi?id=8411

--- Comment #5 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/1caa1fc2c98c0fe06b8440f435cbac744fe7729c Fix issue 8411 - add opCast!bool support for Duration.

https://github.com/dlang/druntime/commit/827fb5ddc73e94b4a55bad0d7aabfa6401b52898 Merge pull request #1793 from schveiguy/addbooldur

--
August 07, 2017
https://issues.dlang.org/show_bug.cgi?id=8411

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to newCTFE at https://github.com/dlang/druntime

https://github.com/dlang/druntime/commit/1caa1fc2c98c0fe06b8440f435cbac744fe7729c Fix issue 8411 - add opCast!bool support for Duration.

https://github.com/dlang/druntime/commit/827fb5ddc73e94b4a55bad0d7aabfa6401b52898 Merge pull request #1793 from schveiguy/addbooldur

--