Boost logo

Boost Users :

Subject: [Boost-users] [assign][cref_list_of] Creating anonymous list of pairs
From: Aaron Levy (aaron.levy_at_[hidden])
Date: 2014-09-21 15:54:07


Is there a way to generate a list of value pairs using ref_list_of or cref_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")...;

or

std::map<string, string> names = ref_list_of<size, std::pair<std::string, std::string>>("foo", "bar")("foo1", "bar1")...;

--
Aaron Levy
aaron.levy_at_[hidden]

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