Boost logo

Boost Users :

Subject: Re: [Boost-users] [MPL] Front of a set of types
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2009-08-31 04:51:52


On Mon, Aug 31, 2009 at 2:37 AM, Marco Guazzone<marco.guazzone_at_[hidden]> wrote:
> On Mon, Aug 31, 2009 at 10:30 AM, OvermindDL1<overminddl1_at_[hidden]> wrote:
>> I do not know of set being ordered or any implementation I use
>> (considering that runtime sets are generally hash maps), so I would
>> not expect that to be ordered personally.  I would use vector if I
>> want something ordered.
>
> You're right and in fact the runtime std::set does not provide a
> "front" operation.
>
> I think you've got the problem: since sets are usually unordered a
> "front" operation may introduce ambiguities.
>
> Since mpl::set provides this operation I think its behavior should be
> made more explicit in order to avoid any ambiguities (like the ones
> I've described in the previous email)

Yea, I agree that the documentation on this should be cleared, not
necessarily by saying that front returns possibly any element, but
rather how it internally stores the type so we know what things like
front/back/etc. will actually do. :)


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