Created on 2009-04-19.00:00:00 last changed 187 months ago
11.4.8.3 [class.conv.fct] paragraph 1 says,
A conversion function is never used to convert a (possibly cv-qualified) object to the (possibly cv-qualified) same object type (or a reference to it), to a (possibly cv-qualified) base class of that type (or a reference to it), or to (possibly cv-qualified) void.
Does this mean that the following example is ill-formed?
auto concept Convertible<typename T, typename U> { operator U(const T&); } template <typename T, typename U> requires Convertible<T, U> U convert(const T& t) { return t; } int main() { convert<int>(42); }
History | |||
---|---|---|---|
Date | User | Action | Args |
2009-08-03 00:00:00 | admin | set | status: open -> concepts |
2009-04-19 00:00:00 | admin | create |