Re: [gtkmm] Q: how to centre in a VBox?



>On Thu, Oct 23, 2003 at 08:57:49AM -0600, D. R. Evans wrote:
>> Ah! gtkmm seems to violate normal STL semantics regarding lifetimes. If I 

others have answered the guts of this already, but i want to make sure
you're clear on an STL point. most examples of using the STL seem to
assume that copying an object when "it" is added to a container is
OK. for some kinds of objects, that might be true, but in a lot of
cases, such copying is not just expensive, its semantically
unacceptable. if the objects represent physical instances in the world
(e.g. a control system), or if they require the use of a scarce
resource, or if they simply have their own semantics in which copying
is a significant and rarely done operation - in all these cases and
more the assumption that most STL examples make is just plain wrong.

i found it very difficult when i started using the STL to understand
this, and it took me a while to realize that i needed to store
pointers in STL containers, not objects.

--p



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