Topic: Defect report: inconsistent copy ctor definition (12.1.10)
Author: Peter Steiner <pnsteiner@gmail.com>
Date: Tue, 20 Dec 2005 21:22:31 +0000 (UTC) Raw View
[ moderator's note: forwarded to C++ committee. -sdc ]
A copy constructor is defined as follows in 12.1.10:
A copy constructor for a class X is a constructor with a first
parameter of type X& or const X&. [Note: see 12.8 for more information
on copy constructors.]
In section 12.8 the definition also includes the volatile qualified
types in addition to the two given above.
While the definition refers to 12.8 with the correct information the
explicit specification of X& and const X& with the other two missing
seems a little bit misleading to me.
-- peter
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
Author: william.m.miller@gmail.com
Date: Thu, 22 Dec 2005 23:57:33 CST Raw View
Peter Steiner wrote:
> A copy constructor is defined as follows in 12.1.10:
>
> A copy constructor for a class X is a constructor with a first
> parameter of type X& or const X&. [Note: see 12.8 for more information
> on copy constructors.]
>
> In section 12.8 the definition also includes the volatile qualified
> types in addition to the two given above.
>
> While the definition refers to 12.8 with the correct information the
> explicit specification of X& and const X& with the other two missing
> seems a little bit misleading to me.
I don't want to pick excessively on Peter, but this is the most recent
of
several "defect reports" posted here (and duly forwarded by the
moderator
to the core language issues list mantainer, i.e., me) for things that
have
already been fixed in the current working draft of the Standard.
Please, folks, before you submit a "defect report" to be considered by
the Committee, check to see if it has already been or is being
addressed.
In this particular case, a check of the current working draft (at the
moment, that's document N1905,
www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf)
would reveal that the wording of 12.1p10 has been replaced by
A copy constructor (12.8) is used to copy objects of class type.
Another place to look, particularly to see if the item is already being
discussed but has not yet been resolved by wording in the working
draft, is in the issues list "Index by Section" (for the core language,
that's www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html;
there's a similar page for the library issues list). In this case, the
fourth issue dealing with 12.1 is "Allowed copy constructor
signatures;" following the link to issue 331
(www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#331)
shows that this issue is exactly the same as the one reported
above and that the resolution was "Voted into WP at October 2003
meeting."
We're happy to have people let us know about problems in the
Standard, but it would be appreciated if folks would do a little
checking beforehand to try to avoid resubmitting old issues.
Thanks!
-- William M. (Mike) Miller
Edison Design Group
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]
Author: "Peter Steiner" <pnsteiner@gmail.com>
Date: Sat, 24 Dec 2005 08:20:24 CST Raw View
william.m.miller@gmail.com wrote:
> Peter Steiner wrote:
> > A copy constructor is defined as follows in 12.1.10:
> >
> > A copy constructor for a class X is a constructor with a first
> > parameter of type X& or const X&. [Note: see 12.8 for more information
> > on copy constructors.]
> >
> > In section 12.8 the definition also includes the volatile qualified
> > types in addition to the two given above.
> >
> > While the definition refers to 12.8 with the correct information the
> > explicit specification of X& and const X& with the other two missing
> > seems a little bit misleading to me.
>
> I don't want to pick excessively on Peter, but this is the most recent
> of
> several "defect reports" posted here (and duly forwarded by the
> moderator
> to the core language issues list mantainer, i.e., me) for things that
> have
> already been fixed in the current working draft of the Standard.
>
> Please, folks, before you submit a "defect report" to be considered by
> the Committee, check to see if it has already been or is being
> addressed.
> In this particular case, a check of the current working draft (at the
> moment, that's document N1905,
> www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1905.pdf)
> would reveal that the wording of 12.1p10 has been replaced by
>
> A copy constructor (12.8) is used to copy objects of class type.
>
> Another place to look, particularly to see if the item is already being
> discussed but has not yet been resolved by wording in the working
> draft, is in the issues list "Index by Section" (for the core language,
> that's www.open-std.org/jtc1/sc22/wg21/docs/cwg_index.html;
> there's a similar page for the library issues list).
uups. i am ashamed to admit that this is even a faq...
-- peter
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]