Title
contract_violation's special member functions
Status
nad
Section
[support.contract.cviol]
Submitter
Tim Song

Created on 2018-07-10.00:00:00 last changed 57 months ago

Messages

Date: 2019-08-05.16:05:14

[ Post Cologne Mailing ]

Contracts were removed from the C++20 draft in Cologne; closing as NAD.

Date: 2019-07-22.17:12:46

[ 2019 Cologne Wednesday night ]

= delete for copy/move assignment; Status to 'Open'; Daniel to provide wording

Date: 2018-11-27.04:34:19

[ 2018-11 Reflector prioritization ]

Set Priority to 1

Date: 2018-07-10.00:00:00

contract_violation is currently defined as:

class contract_violation {
public:
  uint_least32_t line_number() const noexcept;
  string_view file_name() const noexcept;
  string_view function_name() const noexcept;
  string_view comment() const noexcept;
  string_view assertion_level() const noexcept;
};

which implies a full set of defaulted special member functions with entirely unclear semantics, and can arguably be read to imply that it is an aggregate.

It seems unlikely that we meant for users to default construct or copy contract_violation objects, but if we did want to do that, we need to at least specify the behavior of a default constructed contract_violation object and how copying and moving work with respect to the lifetime of the strings referenced by the string_views returned by its member functions.

History
Date User Action Args
2019-08-05 16:05:14adminsetmessages: + msg10544
2019-08-05 16:05:14adminsetstatus: open -> nad
2019-07-22 17:12:46adminsetmessages: + msg10490
2019-07-22 17:12:46adminsetstatus: new -> open
2018-11-27 04:34:19adminsetmessages: + msg10233
2018-07-10 00:00:00admincreate