【发布时间】:2011-08-04 08:47:07
【问题描述】:
有一个结构体包含 intrusive_ptr 字段:
struct BranchFeedback : boost::counted_base {
...
boost::intrusive_ptr<BPredState> theBPState;
};
还有一个变量被定义为
std::vector< std::vector< BPredState > > theFetchState;
现在我已经实例化了一个对象
BranchFeedback theFeedback;
并希望将 theFetchState 分配给该字段
theFeedback.theBPState = theFetchState[anIndex][!anOne];
但是编译器会说一些错误
error: no match for ‘operator=’ in theFeedback.theBPState = .....
我该如何解决这个问题?
【问题讨论】: