Re: [boost] Re: boost::noncopyable

----- Mensaje original ----- De: David Abrahams <dave@boost-consulting.com> Fecha: Domingo, Diciembre 19, 2004 2:58 pm Asunto: [boost] Re: boost::noncopyable
JOAQUIN LOPEZ MU?Z wrote:
2.) When should I derive public and when private from boost::noncopyable?> Given what I said, I think that deriving from boost::noncpyable must be avoided if multiple inheritance is present and you expct your class to be allocated on the stack.
"Must be avoided" is a bit strong. One extra byte usually makes no difference for a class that will be allocated on the stack.
My fault: I meant "allocated on the heap".
But the same argument applies. One extra byte usually makes no difference.
Well, yes, certainly. Possibly, the cases were it matters are not that common. In my work at Boost, I use noncopyable nodes to build data structures, and here deriving from boost::noncopyable is a no-no. In many other situations, as you say, it doesn't make any serious difference. Joaquín M López Muñoz Telefónica, Investigación y Desarrollo
participants (1)
-
JOAQUIN LOPEZ MU?Z