Re: array initialization

From: Francis Glassborow (francis_at_robinton.demon.co.uk)
Date: 06/01/04


Date: Tue, 1 Jun 2004 03:16:59 +0100

In article <c9go6f$9m1$1@news.yaako.com>, huang jianfeng
<carl_huang@amlogic.com.cn> writes
>Are you sure that the second format needs copy constructor?
> It will call direct constructor if class defines a suited direct
>constructor.
>But if the direct constructor is prefixed with "explicitly", it can't.

It is more complicated. It must work as-if the copy ctor was used even
though that copy ctor is explicitly allowed to be optimised away.

These subtle stupidities are part of the motive for my proposed changes
for the next version of C++. There are some even worse ones but this is
neither the time nor the place.

-- 
Francis Glassborow      ACCU
Author of 'You Can Do It!' see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/youcandoit/projects