我正在使用 ubuntu 12.04 - 64 位。当我尝试编译时,我使用 boost 1.46、1.48、1.52 和 gcc 4.4 和 4.6 对其进行了测试:
while (m_burstReqBeatsRemain) {
if (m_burstReqAddress % m_dramRowSize == 0) {
m_admRequestQueue.push_back(adm_request());
adm_request &req = m_admRequestQueue.back();
req.address = m_burstReqAddress;
req.command = tlm::TLM_READ_COMMAND;
//call to min function
req.readLen = std::min(m_burstReqBeatsRemain * sizeof(Td), m_dramRowSize);
}
m_burstReqBeatsRemain--;
m_burstReqAddress += sizeof(Td);
m_ocpTxnQueue.push_back(m_ocpReq);
}
我收到此错误:
no matching function for call to ‘min(long unsigned int&, unsigned int&)
from /usr/include/c++/4.6/bits/stl_algobase.h*
注意:使用 ubuntu 12.04 32 位可以正常工作
知道如何解决这个问题吗?