
Gottlob Frege wrote:
And thoughts on the goal of specific smart pointers for all occasions?
Hi, It happens in some of my projects : I use a kind of std::auto_ptr whenever I need to transmit an aggregation (typically a factory creates an element and returns such auto_ptr). Every raw ptr means 'simple handle'. shared_ptr are used only for aggregation in multithread environment. (This obviously does not cover all your need). My feelings now are that if you put smart pointers everywhere, this could be a little cumbersome to write and read. Use at least raw pointer to represent one of the cases of lifetime duration/use. When you got some very special usage, you might also use some kind of hungarian notation just for that case. That way the whole thing might need a fewer kinds of smart_ptr. This is just my point of view. Thank you for the temp_ptr idea. Best regards, Pierre Morcello -- View this message in context: http://boost.2283326.n4.nabble.com/temp-ptr-preventing-use-as-a-member-tp403... Sent from the Boost - Dev mailing list archive at Nabble.com.