Boost logo

Boost Users :

Subject: Re: [Boost-users] [assign][cref_list_of] Creating anonymous list of pairs
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2014-09-21 21:28:07


On 22/09/2014 07:54, Aaron Levy wrote:
> Is there a way to generate a list of value pairs using ref_list_of
> orcref_list_of. Maybe such a list could be assigned to a map.
> Something like:
>
> ref_list_of<size, std::pair<std::string, std::string>>("foo", "bar")("foo1", "bar1")...;

Did you try map_list_of or pair_list_of? I don't see how it would make
sense to use references, as the pair object doesn't exist yet so you
can't reference it.


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