1
의미 론적 작업에 의해 karmas generator-value를 설정하려하지만 컴파일되지 않습니다. 나는 왜 공감대를 찾을 수 없는지, 나는 문서에서 설명한대로 그것을 사용한다고 확신한다. 내가 카르마를 처음 접했을 때 나는 신인 선수의 실수를 저질렀을 가능성이 가장 큽니다. 최소한의 예 : comipler 오류에boost :: spirit :: karma 의미 론적 작업 할당 오류
#include <boost/spirit/include/karma.hpp>
#include <boost/spirit/include/karma_int.hpp>
#include <boost/spirit/include/karma_generate.hpp>
namespace karma = boost::spirit::karma;
int main() {
std::string s;
std::back_insert_iterator<std::string> out(s);
boost::spirit::karma::generate(out,karma::int_[karma::_1=2]); //won't compile
//boost::spirit::karma::generate(out,karma::int_,2); this compiles and works
std::cout<<s;
}
결과 : 나는 g ++ 4.6.3를 사용하고 1.48을 강화하고있어
error: no viable overloaded '='
.
예. 고맙습니다 – ickby