Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-24216

Add static factory function to Duration that does not throw

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Developer Tools

    Description

      Ex:

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

      Attachments

        Activity

          People

            backlog-server-devtools DO NOT USE - Backlog - Dev Tools
            matt.cotter Matt Cotter
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: