Title
zoned_time converting constructor shall not be noexcept
Status
c++20
Section
[time.zone.zonedtime.ctor]
Submitter
Tomasz Kamiński

Created on 2019-06-20.00:00:00 last changed 46 months ago

Messages

Date: 2019-07-23.15:26:26

Proposed resolution:

This wording is relative to N4820.

  1. Modify [time.zone.zonedtime.overview], class template zoned_time synopsis, as indicated:

    template<class Duration2>
      zoned_time(const zoned_time<Duration2, TimeZonePtr>& zt) noexcept;
    
  2. Modify [time.zone.zonedtime.ctor] as indicated:

    template<class Duration2>
      zoned_time(const zoned_time<Duration2, TimeZonePtr>& y) noexcept;
    

    -9- Requires: Does not participate in overload resolution unless sys_time<Duration2> is implicitly convertible to sys_time<Duration>.

    -10- Effects: Constructs a zoned_time by initializing zone_ with y.zone_ and tp_ with y.tp_.

Date: 2019-08-23.18:06:54

[ 2019-07 Issue Prioritization ]

Status to Tentatively Ready after five positive votes on the reflector.

Date: 2019-06-20.00:00:00

The zoned_time constructor from zoned_time<Duration2, TimeZonePtr> (preserving same time zone, different precision of representation) is currently marked noexcept. Given that the exposition-only member tp_ of type sys_time<duration> has essentially type time_point<system_clock, Duration>, this is incompatible with the invoked time_point constructor, which is not marked as noexcept.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2019-11-19 14:48:30adminsetstatus: voting -> wp
2019-10-07 02:48:00adminsetstatus: ready -> voting
2019-07-23 15:26:26adminsetmessages: + msg10507
2019-07-23 15:26:26adminsetstatus: new -> ready
2019-06-23 12:26:10adminsetmessages: + msg10461
2019-06-20 00:00:00admincreate