[SERVER-24216] Add static factory function to Duration that does not throw Created: 19/May/16 Updated: 06/Dec/22 Resolved: 24/Jun/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Matt Cotter | Assignee: | DO NOT USE - Backlog - Dev Tools |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | platforms-re-triaged | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Developer Tools
|
| Participants: |
| Description |
|
Ex:
|
| Comments |
| Comment by Sara Williamson [ 24/Jun/19 ] | ||
|
Closing this for now, but if a use case arises this ticket can be re-opened. | ||
| Comment by Mark Benvenuto [ 21/Dec/16 ] | ||
|
Another possible design option is to use StatusWith<> instead of optional<>
If there is not motivating example though, I do not see why this is related a C++14 code base | ||
| Comment by Matt Cotter [ 20/May/16 ] | ||
|
That sounds good to me. | ||
| Comment by Andy Schwerin [ 20/May/16 ] | ||
|
I don't think representAs should convert from unitless number types to Duration. Maybe a static factory function on Duration? template <typename Rep2> |