|
Boost : |
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-11-07 13:44:04
"Thorsten Ottosen" <nesotto_at_[hidden]> wrote in message
news:cmlnb5$j8s$1_at_sea.gmane.org...
> "Jonathan Turkanis" <technews_at_[hidden]> wrote in message
> news:cmlj0d$8o9$1_at_sea.gmane.org...
>
>
> | BTW, I used the Assign library in the examples and regression tests, and I
> don't
> | think I could have done without it. Thanks!
>
> you're welcome. A small nitpick:
>
>
> list_of( pair_type("Sofa", "Living Room") )
> ( pair_type("Stove", "Kitchen") )
> can be done as list_of<pair_type>( "Sofa", "Living Room")( "Stove",
> "Kitchen")
> -Thorsten
Thanks. So
// pseudocode initialization
vector< list< pair<string, string> > > test =
{ { { "London", "England"}, { "Paris", "France"} },
{ { "Sofa", "Living Room"}, { "Stove", "Kitchen"} },
{ { "Brain", "Skull"}, { "Appendix", "Abdomen"} } };
translates to
typedef pair<string, string> pair_type;
typedef list<pair_type> list_type;
vector< pair<string, string> > test =
list_of<list_type>(
list_of<pair_type>("London", "England")
("Paris", "France")
)
(
list_of<pair_type>("Sofa", "Living Room")
("Stove", "Kitchen")
)
(
list_of<pair_type>("Brain", "Skull")
("Appendix", "Abdomen")
);
?
Jonathan
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk