Boost logo

Boost :

From: Brian Braatz (brianb_at_[hidden])
Date: 2005-06-18 10:21:14

> -----Original Message-----
> On Behalf Of David Abrahams
> Sent: Friday, June 17, 2005 7:47 AM
> "Brian Braatz" <brianb_at_[hidden]> writes:
> > There is a common mental pattern that occurs:
> >
> > "Hmm.. there SHOULD be a SIMPLE way to do X."
> > (flip through MPL book, MPL ref manual, google boost archives, write
> > sample code)
> > "Hmm.. Ok I can see there maybe a way to do this COMPLETELY from
> > scratch, but I am not totally certain I need to do that. I need to
> > looking. There probably is a clever one liner to solve the
> >
> > Your advice was EXACLY what I needed. (i..e how to THINK about the
> > solution)
> >
> You're welcome. If you wouldn't mind writing up the answer for the
> wiki, that would be awesome. Not sure where it should go; neither
> nor
> bin/boost_wiki/
> seem to be quite right.
> --
> Dave Abrahams
[Brian Braatz Writes:]

After the following is resolved: (both the thread I am responding to and
the link below are 2 halves of the same problem)

I will be able to take a vector<>- go through a set<> and "return" a
vector with all duplicate types removed.

Once I have a final solution to this, I will post the full code (again
for people searching the archives looking to solve the same problem)

Thinking along the same lines as David, here is my suggestion:

* We create a MPL FAQ page on the Wiki (or is there one I could not
* this way when users bump into a problem, we can post the solution to
the FAQ
* it might be a good idea to ask people to post it to THIS LIST first,
otherwise the FAQ may end up with ill formed samples


I would be happy to put the first entry in the Wiki FAQ page if we can
get one created. (i.e. "How do I remove all the duplicate types from a

Also- I would add that using mpl::for_each<> while covered in the MPL
book, would be a good entry to also have in there. (I would be happy to
add an wiki entry referencing the book). Something like "How to I print
all the types in a sequence?" as the question.

some other ideas: (for entries)
* "How do I call decide to call a method on a class based on it's type"
* "How do build a library like boost.function<>, with a variable number
of arguments? How do I do this in such a way as to support older

The basic idea is that the Question is listed, then the answer is
listed. Then references to follow up information is listed. (i.e point
them back to the MPL reference manual or the MPL book)

what do you guys think?

Boost list run by bdawes at, gregod at, cpdaniel at, john at