title: How serialize a boost::function to send it in a message_queue
body: <p>I am actually trying to serialize a boost::function using boost::serialize because I want to share it in a boost::interprocess::message_queue.
  I only see one way to do that, it is to use the non-intrusive version of boost::serialize.</p>
  
  <pre><code>namespace boost {   
   namespace serialization {
         template&lt;class Archive&gt;   
             void serialize(Archive &amp; ar, boost::function&lt;void()&gt; &amp; fct, const unsigned int version) 
         {
       ar &amp; fct.args;
       ar &amp; fct.arity;
       ar &amp; fct.vtable;
       ar &amp; fct.functor;
         }       
    }
  }
  </code></pre>
  
  <p>I will also need to serialize vtable and functor, I didn't try it, I am not sure it is working.</p>
  
  <p>So is there any way to serialize a boost::function in a proper way?</p>
  
  <p>Thank you.</p>