Summary: core.time: No easy way to check if Duration is empty
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: druntime

--- Comment #0 from Vladimir Panteleev <> 2012-07-22 
06:46:38 PDT ---
The simplest way to check for an empty Duration seems to be:

if (!!"hnsecs"()) { ... }

I suggest either implementing an isEmpty property (given that there already is
an isNegative property), or implement opCast!bool so that the following will

if (!duration) { ... }

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to