This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-10-26


331. Allowed copy constructor signatures

Section: 11.4.5  [class.ctor]     Status: CD1     Submitter: Richard Smith     Date: 8 Jan 2002

[Voted into WP at October 2003 meeting.]

11.4.5 [class.ctor] paragraph 10 states

A copy constructor for a class X is a constructor with a first parameter of type X & or of type const X &. [Note: see 11.4.5.3 [class.copy.ctor] for more information on copy constructors.]

No mention is made of constructors with first parameters of types volatile X & or const volatile X &. This statement seems to be in contradiction with 11.4.5.3 [class.copy.ctor] paragraph 2 which states

A non-template constructor for class X is a copy constructor if its first parameter is of type X &, const X &, volatile X & or const volatile X &, ...

11.4.5.3 [class.copy.ctor] paragraph 5 also mentions the volatile versions of the copy constructor, and the comparable paragraphs for copy assignment (11.4.5.3 [class.copy.ctor] paragraphs 9 and 10) all allow volatile versions, so it seems that 11.4.5 [class.ctor] is at fault.

Proposed resolution (October 2002):

Change 11.4.5 [class.ctor] paragraph 10 from

A copy constructor for a class X is a constructor with a first parameter of type X& or of type const X&. [Note: see 11.4.5.3 [class.copy.ctor] for more information on copy constructors. ]
to (note that the dropping of italics is intentional):
A copy constructor (11.4.5.3 [class.copy.ctor]) is used to copy objects of class type.