title: error: lvalue required as unary ‘&’ operand
body: <p>In my code, I am calling the function like this:</p>
  
  <pre><code>Simulator::Schedule (Seconds(seconds),
                       &amp;HelloProtocol::sendScheduledInterest(seconds), this, seconds);
  </code></pre>
  
  <p>Here is the signature of the above function:</p>
  
  <pre><code>  /**
     * @param time the relative expiration time of the event.
     * @param mem_ptr member method pointer to invoke
     * @param obj the object on which to invoke the member method
     * @param a1 the first argument to pass to the invoked method
     * @returns an id for the scheduled event.
     */
    template &lt;typename MEM, typename OBJ, typename T1&gt;
    static EventId Schedule (Time const &amp;time, MEM mem_ptr, OBJ obj, T1 a1);
  </code></pre>
  
  <p>And the definition of function sendScheduledInterest() is:</p>
  
  <pre><code>void
  HelloProtocol::sendScheduledInterest(uint32_t seconds)
  {
      //...
  }
  </code></pre>
  
  <p>I am getting the following compilation error:</p>
  
  <pre><code>hello-protocol.cpp: In member function ‘void ns3::nlsr::HelloProtocol::scheduleInterest(uint32_t)’:
  hello-protocol.cpp:58:60: error: lvalue required as unary ‘&amp;’ operand
  </code></pre>
  
  <p>If I remove the <code>&amp;</code> before the function call, it gives the following error instead:</p>
  
  <pre><code>hello-protocol.cpp: In member function ‘void ns3::nlsr::HelloProtocol::scheduleInterest(uint32_t)’:
  hello-protocol.cpp:58:75: error: invalid use of void expression
  </code></pre>