|
Boost : |
From: Matias Capeletto (matias.capeletto_at_[hidden])
Date: 2007-05-23 16:21:11
Thorsten propose to change the way the library works with tags.
Suppose we have a bimap with user defined names:
struct name {};
struct id{};
typedef bimap< tagged<std::string,name>, tagged<int> > People;
People people;
Instead using free functions like this:
iterator_type_by<name,People>::type iter = map_by<name>(people).find("Peter");
the library now use templated member functions:
People::map_by<name>::iterator iter = people.by<name>().find("Peter");
I think that this is a big improvement. Thanks Thorsten to point it.
What do you think about it?
John Maddok state that the section that describe how to use tags in
the docs was not clear. The section is here:
http://tinyurl.com/2swjyg
Is it clearer now?
Thank you all
Best regards
Matias
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk