Andrew Schwartzmeyer created MESOS-8915:
-------------------------------------------

             Summary: Re-enable ProcessTest.Process_BENCHMARK_DispatchDefer on 
Windows
                 Key: MESOS-8915
                 URL: https://issues.apache.org/jira/browse/MESOS-8915
             Project: Mesos
          Issue Type: Bug
         Environment: Windows with Visual Studio 15.7.1 (not earlier)
            Reporter: Andrew Schwartzmeyer
            Assignee: Andrew Schwartzmeyer


After updating to Visual Studio 15.7.1, the following code in the setup for the 
eponymous test no longer compiles:

 
{noformat}
  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();
  }
{noformat}

Specifically it fails with the error:

{noformat}
..\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 &)'
{noformat}

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}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to