(Edit: Heavy change because previous example was flawed, which may make some answers/comments seem odd)
This might be an overly contrived, but the following
In my opinion, the fact of that the ctors haven't return-type specification is what fails here. Any other imaginable syntax like for example
class A
{
const A& ctor(...);
}
would be, imho, very valuable. For example, imagine such a situation of calling a method with prototype
void my_method(const my_own_string_class& z);
If my_own_string_class holds a ctor from char*, the compiler could choose this ctor, but as this ctor is not allowed to return a const object, it need to allocate and copy... If const return type were allowed, one could do
class my_own_string_class
{
char *_ptr;
public:
const my_own_string_class& ctor(char *txt)
: _ptr(txt)
{ return *this;}
}
provided that this special construct be restricted to the creation of temporal instances. (And dtor's must be mutable ;) ).