title: How to assign to any_type of utree
body: <p>I've written a parser for arithmetic expressions as part of a larger project (~25 rules and counting) and I'm trying to add the capability of parsing a function call inside such expressions.</p>
  
  <p>In short, what I'm trying to do is assign a <code>FunctionCall</code> to the <code>utree</code> via its <code>any_ptr</code> member.  Here's a short form of what I'm trying to do:</p>
  
  <pre><code>#include &lt;boost/spirit/include/qi.hpp&gt;
  #include &lt;boost/spirit/include/phoenix.hpp&gt;
  #include &lt;boost/spirit/include/support_utree.hpp&gt;
  
  struct FunctionCall
  {
      //...
  };
  
  int main()
  {
      using namespace boost::spirit;
      qi::rule&lt;
          std::string::iterator, FunctionCall()&gt; function;
  
      qi::rule&lt;
          std::string::iterator,
          utree()&gt; expression;
      expression = function[_val = &amp;_1];
  }
  </code></pre>
  
  <p>This compiles, but as you can see the semantic action is in all likelihood going to take the address of a temporary variable and pass that to the <code>utree</code> (I haven't even bothered to run it, that's how sure I am).</p>
  
  <p>So my questions are:
  What is the correct way to assign a <code>FunctionCall</code> object to the <code>utree</code>?<br>
  Does it have to be through the <code>any_ptr</code> member?<br>
  In which case I assume it requires a dynamically-allocated copy of the object to be assigned to it, so how do I specify that in a semantic action?<br>
  Lastly, I seem to have a hard time finding documentation for <code>any_ptr</code>, is it a smart pointer as well or do I have to manually delete what I put into it?</p>