Title
ConvertibleTo prose does not match code
Status
new
Section
[concept.convertibleto]
Submitter
Hubert Tong

Created on 2019-03-05.00:00:00, last changed 2019-03-05.00:00:00.

Messages

Date: 2019-03-05.00:00:00

The prose in N4800 subclause [concept.convertibleto] indicates that the requirement is for an expression of a particular type and value category to be both implicitly and explicitly convertible to some other type. However, for a type

struct A { A(const A&) = delete; };

ConvertibleTo<const A, A> would be false despite the following being okay:

const A f();

A test() {
  static_cast<A>(f());
  return f();
}
History
Date User Action Args
2019-03-05 00:00:00admincreate