Boost logo

Boost Users :

Subject: [Boost-users] returning pointer to Boost::assign::map_list_of
From: alapex0310_at_[hidden]
Date: 2010-07-15 07:00:40


Hi,

I am new to Boost::Assign.

I have a std::map<std::string, unsigned char> and I have a SomeClass
with constructor SomeClass(std::string, std::map<std::string, unsigned
char>*) and I want to pass the pointer to the result of map_list_of to
SomeClass like this:

            SomeClass *psc = new
SomeClass("SomeClassName",map_list_of("one",1)("two",2)("three",3)("four",4)("five",5);

In the example at
http://www.boost.org/doc/libs/1_43_0/libs/assign/doc/index.html#intro ,
the map_list_of is definitely returning a small map. I don't want to
pass the map object itself but the pointer to the map object returned by
map_list_of.

Please help me.

-Best regards


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