Home > Back-end >  gmock template class 'const T1': actual parameter with requested alignment of 64 won'
gmock template class 'const T1': actual parameter with requested alignment of 64 won'

Time:04-22

I am trying to gmock the following template class

template <typename Type>
class Interface {
  public:
    virtual bool insert(const Type& param);

}

by using gmock as follows

template <typename Type>

class CMockInterface: public Interface<Type> {

MOCK_METHOD1_T(insert, bool(const Type&));

}

when building I get the following errors

error C2718: 'const T1': actual parameter with requested alignment of 64 won't be aligned

note: see reference to class template instantiation 'testing::internal::ImplicitlyConvertible<const T &,testing::internal::BiggestInt>' being compiled

what is this error?

CodePudding user response:

This is a known bug in GoogleTest, and was fixed a while ago. Try updating GoogleTest to at least 1.10.0.

  • Related