This is the mail archive of the
mailing list for the GCC project.
Re: Copy Constructor Problem with 3.2.2??
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Phil Prentice <philp dot cheer at btinternet dot com>
- Cc: gcc-help at gnu dot org, gcc at gnu dot org
- Date: Fri, 18 Jun 2004 09:20:45 -0700
- Subject: Re: Copy Constructor Problem with 3.2.2??
- References: <E1BbHDoemail@example.com>
On Fri, Jun 18, 2004 at 11:03:49AM +0100, Phil Prentice wrote:
> I have a problem with the copy constructor.
Point::Point(Point&) is not a copy constructor (or, rather, it is a
restricted copy constructor); it only accepts arguments that are
actual, changeable Point objects.
> I have knocked up a simple
> program that demonstrates this problem. I have compiled this same program
> using Visual C++ (windows) and it compiles & runs as I would have expected.
Then you should send a bug report to Microsoft. If the compiler
accepts an attempt to bind a non-const reference to a temporary,
this is a serious error in the compiler.