List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:March 28 2010 2:34pm
Subject:Re: Connection copy-constructor segfault?
View as plain text  
On Mar 27, 2010, at 5:06 AM, Jonathan Wakely wrote:

> On 27 March 2010 04:27, Warren Young wrote:
>> On 3/26/2010 8:21 PM, Jonathan Wakely wrote:
>>> 
>>> Don't copy the Connection class.
>> 
>> It's supposed to work,
> 
> My mistake - I was confusing it with another class. If I recall
> correctly there's something which is copyable only so it can be
> returned by value, or did that get changed?

No, you're remembering correctly, I'm just not communicating clearly.

We covered this about six months ago here:

	http://lists.mysql.com/plusplus/8728

Let me try to make my thoughts on this clear:

Currently, Connection's copy ctor exists only to support return-by-value semantics.  When
I say it should allow arbitrary copies, I mean only that we do have a copy ctor, and good
C++ design says it should provide full copy semantics.  But, because it's inefficient as
hell and no one has yet given me a better argument why we need full copy semantics than
"because Scott Meyers says so", I'm stuck wondering why I should spend time making it
easy to use the library inefficiently.

That said, if someone provides a fix that corrects this, I don't see why I wouldn't accept
it.

> I'll be quiet now :-)

You are of course aware that I'm glad you *don't* stay quiet.
Thread
Connection copy-constructor segfault? Alexander Golec27 Mar
  • Re: Connection copy-constructor segfault?Jonathan Wakely27 Mar
    • Re: Connection copy-constructor segfault?Warren Young27 Mar
      • Re: Connection copy-constructor segfault?Jonathan Wakely27 Mar
        • Re: Connection copy-constructor segfault?Warren Young28 Mar