Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
None
-
None
-
None
-
Windows with Visual Studio 15.7.1 (not earlier)
Description
After updating to Visual Studio 15.7.1, the following code in the setup for the eponymous test no longer compiles:
template <typename T> Future<Nothing> handler(const T& data) { count++; if (count >= repeat) { promise->set(Nothing()); return Nothing(); } dispatch(self(), &Self::_handler).then( defer(self(), &Self::handler<T>, data)); return Nothing(); }
Specifically it fails with the error:
..\3rdparty\libprocess\src\tests\benchmarks.cpp(566): error C2276: '&': illegal operation on bound member function expression ..\3rdparty\libprocess\src\tests\benchmarks.cpp(566): note: This diagnostic occurred in the compiler generated function 'process::Future<Nothing> DispatchProcess::handler(const T &)'
That is, the compiler is (now) complaining that &Self::handler<T> is invalid.
I debugged this a little bit with Michael Park, but we don't know what's gone wrong (especially considering similar code is working elsewhere, specifically ProcessTest.Dispatch and etc.). Fortunately, it only affects this single test, so the code is being turned off until we can break it down and fix it.
We already tried to (1) declare _handler before handler, and (2) changed _handler's access specifier to be public.
Attachments
Issue Links
- duplicates
-
MESOS-8686 Mesos build failed with /permissive- + MSVC on windows
- Resolved