|
Boost Users : |
Subject: Re: [Boost-users] [MPL] Front of a set of types
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2009-09-01 04:59:52
On Tue, Sep 1, 2009 at 10:39 AM, OvermindDL1<overminddl1_at_[hidden]> wrote:
> I just think of it this way, front() will get the first element in a
> container, now sometime those containers are linear, like vector or
> list or cons, but other times they are not linear, then who knows what
> I may get first, like with set and map. Besides, is it not more
> proper to use an iterator? I have never personally used front, always
> use an iterator since I need all elements to test with when using a
> set/map, only ever used it with vector/list/cons, where it makes
> sense.
Well, as I said previously, I completely agree with you.
I've used front just for trying all mpl::set operations.
But the point is that "front" is defined for sets (and maps) so we and
possible future users need a clear definition of its behavior on these
data structures, or at least a big-note beside it saying
"Please don't use this operation for XXX since it is implementation
dependent"
where XXX in {"mpl::set", "mpl::map"}
I'm curious what MPL authors think about this.
-- Marco
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