错误:没有匹配的构造函数,无法初始化'std :: __ 1 :: pair <const int,=“”

时间:2019-05-07 00:30:22

标签: c++ boost std stdstring stdset

=“”

在过去的几天里一直在处理此问题,并且似乎无法动摇一切,因此非常感谢和感谢所有帮助。

非常感谢您。

错误代码:

  /usr/local/include/boost/assign/list_of.hpp:164:20: error: no matching
  constructor for initialization of 'std::__1::pair<const int,
  std::__1::set<std::__1::basic_string<char>,
  std::__1::less<std::__1::basic_string<char> >,
  std::__1::allocator<std::__1::basic_string<char> > > >'
  return Container( begin(), end()  );

我已经尝试了所有我知道的但似乎无法解决的问题。

头文件:

typedef std::map<int, std::set<std::string> > MapRegisteredPeople;

来源:

registeredPeople = (MapRegisteredPeople) {
    boost::assign::map_list_of
    (0,     std::set<std::string>() )
    (1, boost::assign::list_of<std::string>
                (“FOO1”) 
                (“FOO2”)
    .convert_to_container<std::set<std::string> >())
    };

我希望可以编译并继续进行而不会出错,但是,a,如果一个可爱的灵魂在这里帮助我,那将是很棒的。非常感谢。

0 个答案:

没有答案
相关问题