title: boost::bind and virtual functions
body: <p>I have he following interface:</p>
  
  <pre><code>template &lt;class T&gt;
  class AbstractTask {
  public:
      virtual void BindTaskCompleted(AbstractTask&lt;T&gt; &amp;bindedTask)=0;
      virtual void Join(TaskResult&lt;T&gt;)=0;
  };
  </code></pre>
  
  <p>And the following implentation:</p>
  
  <pre><code>template &lt;class T&gt;
  class SlaveTask: public AbstractTask&lt;T&gt; {
  public:
      typedef boost::function&lt;void(TaskResult&lt;T&gt;)&gt; joinFunction;
  
      void BindTaskCompleted(AbstractTask&lt;T&gt; &amp;bindedTask)
      {
          /////////////WORK OK//////////////////////////////  
          //bindedTask.Join(result);
  
          /////////////COMPILATION ERROR/////////////////////
          slaveTaskCompletionFunction=boost::bind(&amp;AbstractTask&lt;T&gt;::Join,bindedTask,result);
      }
  
       void Join(TaskResult&lt;T&gt; r)
      {
          slaveTaskCompletionFunction(r);
      }
  
  private:
      joinFunction slaveTaskCompletionFunction;
      TaskResult&lt;T&gt; result;
  
  };
  </code></pre>
  
  <p>I'm trying to bind the virtual Join Method of a AbstractTask implementation to a boost::function with the same signature. boost::bind throws 77 compilation errors and I fail to see why.</p>
  
  <p>I thought at first that boost::bind couldn't be use with virtual method but this doesn't seem to be the case:
  <a href="https://stackoverflow.com/questions/8955289/virtual-function-and-boost-bind-strange-behavior">Virtual function and boost bind strange behavior</a></p>
  
  <p>Thanks in advance for your help!</p>
  
  <p>Thomas</p>