发布时间:2022-07-04 文章分类:编程知识 投稿人:赵颖 字号: 默认 | | 超大 打印

1
down vote

One note is that you can also use Boost.Assign:

usingnamespace std;usingnamespace boost::assign;// bring 'map_list_of()' into scopevoid something(){
  map<int,int> my_map = map_list_of(1,2)(2,3)(3,4)(4,5)(5,6);}