Boost logo

Boost Users :

Subject: Re: [Boost-users] Intrusive
From: Robert Jones (robertgbjones_at_[hidden])
Date: 2011-04-13 09:28:59


On Wed, Apr 13, 2011 at 1:04 PM, asif saeed <asif.lse2_at_[hidden]> wrote:

> Hi,
>
> I frequently come across the term "intrusive" in boost users mailing list.
> What does it mean? Would any of you please provide a reference such as an
> online reference/link, etc?
>
>
"Intrusive" refers to whether the client objects of a technique or container
need to be altered to support the technique or be stored
in the container.

For example the STL containers, vector, list, map etc do not require any
changes to the objects they
contain in order t place those objects in the containers. Those containers
are non-intrusive.

An alternative is make changes to the object to support usage in a
container, such as is done by the
boost intrusive containers.

Generally non-intrusiveness is to be preferred, since this does not require
change to the object (which may
not be possible), and reduces coupling. However, intrusive containers
generally offer the possibility of greater
implementation efficiency and better memory layout, so are sometimes
(probably rarely) preferred.

HTH

- Rob.



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net