Issue 4067: Inconsistency and potential infinity meta-recursion in std::chrono::zoned_time's constructors (original) (raw)
-?- Let _locatable-as-tzptr_ be true if given an lvalue sv of type string_view, traits::locate_zone(sv) is well-formed and TimeZonePtr is implicitly convertible from its return type, and false otherwise. Only the validity of the immediate context of the invocation and conversion is considered.
-?- In every constructor that takes a string_view parameter name, let _converted-tzptr_ be a variable of type TimeZonePtr that is copy-initialized from traits::locate_zone(name).
[…]
explicit zoned_time(string_view name);
-7- Constraints:
traits::locate_zone(string_view{})is a well-formed expression andzoned_timeis constructible from the return type oftraits::locate_zone(string_view{})_locatable-as-tzptr_istrue.-8- Effects: Initializes
zone_withtraits::locate_zone(name)and default constructstp_.
[…]
zoned_time(string_view name, const sys_time& st);
-13- Constraints:
zoned_timeis constructible from the return type oftraits::locate_zone(name)andst_locatable-as-tzptr_istrue.-14- Effects: Equivalent to construction with
{~~traits::locate_zone(name)~~std::move(_converted-tzptr_), st}.
[…]
zoned_time(string_view name, const local_time& tp);
-18- Constraints:
_locatable-as-tzptr_istrueandzoned_timeis constructible fromthe return type oftraits::locate_zone(name)TimeZonePtrandtp.-19- Effects: Equivalent to construction with
{~~traits::locate_zone(name)~~std::move(_converted-tzptr_), tp}.
[…]
zoned_time(string_view name, const local_time& tp, choose c);
-23- Constraints:
_locatable-as-tzptr_istrueandzoned_timeis constructible fromthe return type oftraits::locate_zone(name)TimeZonePtr,local_time<Duration>, andchoose.-24- Effects: Equivalent to construction with
{~~traits::locate_zone(name)~~std::move(_converted-tzptr_), tp, c}.
[…]
template<class Duration2, class TimeZonePtr2> zoned_time(string_view name, const zoned_time<Duration2, TimeZonePtr2>& y);
-32- Constraints:
_locatable-as-tzptr_istrueandzoned_timeis constructible fromthe return type oftraits::locate_zone(name)TimeZonePtrand the typezoned_time<Duration2, TimeZonePtr2>.-33- Effects: Equivalent to construction with
{~~traits::locate_zone(name)~~std::move(_converted-tzptr_), y}.
template<class Duration2, class TimeZonePtr2> zoned_time(string_view name, const zoned_time<Duration2, TimeZonePtr2>& y, choose c);
-34- Constraints:
_locatable-as-tzptr_istrueandzoned_timeis constructible fromthe return type oftraits::locate_zone(name)TimeZonePtr, the typezoned_time<Duration2, TimeZonePtr2>, and the typechoose.-35- Effects: Equivalent to construction with
{~~traits::locate_zone(name)~~std::move(_converted-tzptr_), y, c}.