mockitopp
mockitopp copied to clipboard
VS 2010 not working
it seems that they changed the member function pointer internals
compiler error:
C:\dev\st_trunk\OpenAgent\BuildUtilities\Cpp\include\mockitopp/detail/stubbing/p
roxy_vfunction.hpp(142): error C2440: 'reinterpret_cast' : cannot convert from
'void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &)' to 'void *(__thiscall
mockitopp::detail::proxy_vfunction_factory<M>::* )(void)'
1> with
1> [
1> M=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &)
1> ]
1> Pointers to members have different representations; cannot cast
between them
1>
C:\dev\st_trunk\OpenAgent\BuildUtilities\Cpp\include\mockitopp/detail/stubbing/p
roxy_vfunction.hpp(140) : while compiling class template member function 'void
*mockitopp::detail::proxy_vfunction_factory<M>::get(M)'
1> with
1> [
1> M=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &)
1> ]
1>
C:\dev\st_trunk\OpenAgent\BuildUtilities\Cpp\include\mockitopp/detail/stubbing/d
ynamic_object.hpp(127) : see reference to class template instantiation
'mockitopp::detail::proxy_vfunction_factory<M>' being compiled
1> with
1> [
1> M=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &)
1> ]
1>
c:\dev\st_trunk\openagent\buildutilities\cpp\include\mockitopp\mock_object.hpp(3
6) : see reference to function template instantiation
'mockitopp::detail::dynamic_vfunction<T>
&mockitopp::detail::dynamic_object::define_function<M>(M)' being compiled
1> with
1> [
1> T=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &),
1> M=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &)
1> ]
1>
c:\dev\st_trunk\openagent\buildutilities\cpp\include\mockitopp\mock_object.hpp(4
0) : see reference to function template instantiation
'mockitopp::detail::dynamic_vfunction<T>
&mockitopp::mock_object<Communicator::CRequestHandler>::expect<M>(M)' being
compiled
1> with
1> [
1> T=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &),
1> M=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &)
1> ]
1> mockArgumentFactory.cpp(26) : see reference to function template
instantiation 'mockitopp::detail::dynamic_vfunction<T>
&mockitopp::mock_object<Communicator::CRequestHandler>::operator
()<void(__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &)>(M)' being compiled
1> with
1> [
1> T=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &),
1> M=void (__thiscall Communicator::CRequestHandler::*
)(Communicator::CCommunicatorImpl &)
1> ]
Original issue reported on code.google.com by [email protected] on 6 Nov 2014 at 10:12