문제

I'm attempting to follow this example from the documentation (see typedef for word_counter).

#include <string>
#include <boost/bimap.hpp>
#include <boost/bimap/unordered_set_of.hpp>

typedef boost::bimap
<
  boost::bimap::unordered_set_of< std::string >,
  std::string
> MyBimap;

Error thrown is

test.cpp:11:1: error: wrong number of template arguments (1, should be 5) In file included from /usr/include/boost/bimap.hpp:13:0, from test.cpp:3: /usr/include/boost/bimap/bimap.hpp:133:7: error: provided for ‘template class boost::bimaps::bimap’ test.cpp:11:10: error: invalid type in declaration before ‘;’ token

도움이 되었습니까?

해결책

You have a typo. Instead of

boost::bimap::unordered_set_of< std::string >,

use

boost::bimaps::unordered_set_of< std::string >,

in the template.

It will compile then.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top