화살표 연산자가 부스트 멀티 어레이 반복기에서 누락 되었습니까? 이게 효과가 있다고 기대하는 것이 잘못 되었나요?화살표 연산자 및 부스트 멀티 어레이 반복기
#include <vector>
#include <boost/multi_array.hpp>
struct foo {
int n;
};
int main()
{
{
std::vector<foo> a;
auto it = a.begin();
int test = it->n; // this does compile
}
{
boost::multi_array<foo, 1> a;
auto it = a.begin();
int test = it->n; // this does not compile
}
return 0;
}
어떤 종류의 컴파일 오류가 발생합니까? –
' '->': 참조 포인터가 불법입니다 .' \ boost \ multi_array \ iterator.hpp – cambunctious