<p>want to pass boost::bind to a method expecting a plain function pointer (same signature).</p>

<pre><code>typedef void TriggerProc_type(Variable*,void*);
void InitVariable(TriggerProc_type *proc);
boost::function&lt;void (Variable*, void*)&gt; triggerProc ...
InitVariable(triggerProc);

error C2664: 'InitVariable' : cannot convert parameter 1 from 
'boost::function&lt;Signature&gt;' to 'void (__cdecl *)(type *,void *)'
</code></pre>

<p>I can avoid storing a boost::function and just pass the bound functor directly, but then I get similar error:</p>

<pre><code>error C2664: 'blah(void (__cdecl *)(type *,void *))' : cannot convert parameter
1 from 'boost::_bi::bind_t&lt;R,F,L&gt;' to 'void (__cdecl *)(type *,void *)'
</code></pre>

I think you want to use the target() member function of boost::function (isn't that a mouthful...)
```
```
#include <boost/function.hpp>
#include <iostream>

int f(int x)
{
  return x + x;
}

typedef int (*pointer_to_func)(int);

int
main()
{
  boost::function<int(int x)> g(f);

  if(*g.target<pointer_to_func>() == f) {
    std::cout << "g contains f" << std::endl;
  } else {
    std::cout << "g does not contain f" << std::endl;
  }

  return 0;
}
```
```