<chrono>: Overhaul zoned_time to use concepts instead of SFINAE by StephanTLavavej · Pull Request #5907 · microsoft/STL (original) (raw)
Works towards #602. Fixes #1910.
LWG-4067 "Inconsistency and potential infinity meta-recursion in std::chrono::zoned_time's constructors" is relevant, but it's P3 according to LWG so it probably won't be resolved any time soon. I believe that converting our constraints to concepts is an improvement, even if the Standard is kind of confused right now.
- Move ref within
type_identity_tfor consistency. zoned_timeoverhaul: Convert SFINAE to concepts.- I'm phrasing the constraints slightly differently from the Standard to perma-workaround EDG bugs, but I believe they're morally equivalent, and in practice everyone uses
const time_zone*anyways.
- I'm phrasing the constraints slightly differently from the Standard to perma-workaround EDG bugs, but I believe they're morally equivalent, and in practice everyone uses
zoned_time: Avoid delegating constructors.- In theory this repeats a bit of code, but IMO it clarifies what's happening (because
zoned_timehas so many constructors). This also avoids repeatedly evaluating constraints.
- In theory this repeats a bit of code, but IMO it clarifies what's happening (because