Re: [sigc] callbacks with std::auto_ptr by value



David Eriksson wrote:
On Thu, 2006-08-31 at 22:18 +0200, klaus triendl wrote:
Hi,

there are compile problems with std::auto_ptr.
The following code won't compile:

[snip]

What do you think?

I would suggest the use of boost::shared_ptr or similar instead of
std:auto_ptr.

\David

Or, if your compiler supports it (gcc 4+ does) use std::tr1::shared_ptr, which is the form that has been approved by the steering committee, and is in essence the boost::shared_ptr.


When ISO adopts the recommendation of the steering committee, it will be std::shared_ptr.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]