2013-12-24 15 views
1

문서에서 this example을 따르려고합니다 (word_counter의 typedef 참조). 던져unordered_set_of를 Boost.Bimap과 함께 사용하는 중 오류가 발생했습니다.

#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; 

오류는 오타가

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

+0

컴파일러 및 버전은 무엇입니까? – StilesCrisis

답변

2

입니다. 대신 템플릿의 사용

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

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

의.

그러면 컴파일됩니다.

관련 문제