我正在嘗試 gmock 以下模板類
template <typename Type>
class Interface {
public:
virtual bool insert(const Type& param);
}
通過使用 gmock 如下
template <typename Type>
class CMockInterface: public Interface<Type> {
MOCK_METHOD1_T(insert, bool(const Type&));
}
構建時出現以下錯誤
錯誤 C2718:“const T1”:請求對齊為 64 的實際引數將不會對齊
注意:請參閱正在編譯的類模板實體化 'testing::internal::ImplicitlyConvertible<const T &,testing::internal::BiggestInt>' 的參考
這是什么錯誤?
uj5u.com熱心網友回復:
這是GoogleTest中的一個已知錯誤,不久前已修復。嘗試將 GoogleTest 更新到至少 1.10.0。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/464685.html
