Add static factory function to Duration that does not throw

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Ex:

      int ms = 12341234;
      auto millis = representAs<Milliseconds>(ms);
      
      // use case I want:
      fn( representAs<Milliseconds>(userInputMs).value_or(Milliseconds::max()) );
      

            Assignee:
            DO NOT USE - Backlog - Dev Tools
            Reporter:
            Matt Cotter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: