On Wed, Aug 3, 2011 at 12:56 PM, Teg <[email protected]> wrote:

> I'd suggest either not doing it (prevent the copy constructor from
> compiling by declaring it private) or doing it by passing ownership of
> the connection around as if it was a socket or file handle.
>

+1 to that.

It is "almost never" a good idea to implement copy ctors for classes which
refer to stream handles and such.

The absolute simplest/sanest/safest way to implement this is to declare the
copy ctor and copy assignment operator as private and NOT implement them.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to