Title
Copy constructors and default arguments
Status
nad
Section
11.4.5.3 [class.copy.ctor]
Submitter
Daveed Vandevoorde

Created on 1997-09-22.00:00:00 last changed 323 months ago

Messages

Date: 2004-09-10.00:00:00

The working paper is quite explicit about

    struct X {
         X(X, X const& = X());
    };
being illegal (because of the chicken & egg problem wrt copying.)

Shouldn't it be as explicit about the following?

    struct Y {
        Y(Y const&, Y = Y());
    };
Rationale: There is no need for additional wording. This example leads to a program which either fails to compile (due to resource limits on recursive inlining) or fails to run (due to unterminated recursion). In either case the implementation may generate an error when the program is compiled.
History
Date User Action Args
1997-09-22 00:00:00admincreate