title: C++ Visual Studio 2015 “non-standard syntax; use '&' to create a pointer to member”
body: <p>I work with TaskScheduler COM, this is my code:</p>
  
  <pre class="lang-cpp prettyprint-override"><code>typedef HRESULT(*FuncOfBoll)(_Out_ VARIANT_BOOL* b);
  
  static bool GetBool(FuncOfBoll func)
  {
      VARIANT_BOOL b = VARIANT_FALSE;
      HRESULT hr = func(&amp;b);
      if (FAILED(hr)) return FALSE;
      return b == VARIANT_TRUE;
  }
  
  void test(ITaskSettings* settings)
  {
      bool b = GetBool(settings-&gt;get_StopIfGoingOnBatteries); // &lt;= The error here
      // ...
  }
  </code></pre>
  
  <p>and I get the following error:</p>
  
  <blockquote>
    <p>Error C3867   'ITaskSettings::get_StopIfGoingOnBatteries': non-standard
    syntax; use '&amp;' to create a pointer to member</p>
  </blockquote>
  
  <p>What is my mistake and how to correct it?</p>