From: Lee Crabtree (lcrabtree_at_[hidden])
Date: 2005-09-19 12:35:08


Hi, I'm trying initialize a static map with map_list_of. Something along the
lines of:

map<int,int> blarg = map_list_of(1, 2);

However, when I go to compile, I receive the following error:

error C2440: 'initializing' : cannot convert from
'boost::assign_detail::generic_list<T>' to 'std::map<_Kty,_Ty,_Pr,_Alloc>'

with

[

T=std::pair<boost::assign_detail::assign_decay<int>::type,boost::assign_detail::assign_decay<int>::type>

]

and

[

_Kty=int,

_Ty=int,

_Pr=std::less<int>,

_Alloc=std::allocator<std::pair<const int,int>>

]

I have absolutely no idea what this means. Am I missing something obvious,

or is there a more sinister problem afoot?

Lee Crabtree