boost::static_visitor with multiple arguments
<pre><code>typedef boost::variant&lt;int, double&gt; Type;
class Append: public boost::static_visitor&lt;&gt;
{
public:
    void operator()(int)
    {}

    void operator()(double)
    {}

};

Type type(1.2);
Visitor visitor;
boost::apply_visitor(visitor, type);
</code></pre>

<p>Is it possible to change the visitor such that it receives extra data as follows:</p>

<pre><code>class Append: public boost::static_visitor&lt;&gt;
{
public:
    void operator()(int, const std::string&amp;)
    {}

    void operator()(double, const std::string&amp;)
    {}
};
</code></pre>

<p>This string value changes during the lifetime of the Append object. Passing the string in via the constructor is not an option in this case.</p>
