Boost logo

Boost Users :

From: Daniel Mitchell (danmitchell_at_[hidden])
Date: 2006-05-29 16:06:49


On Monday 29 May 2006 13:42, Jens Müller wrote:
> I used something like I quoted from the docs (struct with only a type),
> and then used a default-constructed value (my_property_t()) to access
> the map.
>
> Is that "worse style" than the one currently employed in the lib?

I guess that's a matter of opinion. Personally, I don't see it as worse style.

> Is constructing/passing a struct with no data members more efficient
> than it is with an enum, or is there no difference?

I don't know, but I would bet that the difference--it it exists at all--is
negligible. Ideally the compiler will elide the struct/enum object
altogether, since it's only the type that's important.

D.


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