Copying object with const members to a non const object
<p>I have the following data container:</p>

<pre><code>struct Node
{
    explicit Node(const std::vector&lt;Data&gt;&amp; _data, const Value&amp; _value): data(_data), value(_value)
    {
    }

    const std::vector&lt;Data&gt; data;
    const Value value;
};
</code></pre>

<p>I wish to write a mock along these lines:</p>

<pre><code>class MockVisitor: public IVisitor
{
public:
    virtual void operator()(const Node&amp; _node)
    {
        node = _node;
    }

    Node node;
};
</code></pre>

<p>However, I'm getting the error:</p>

<pre><code>error C2582: 'operator =' function is unavailable in 'Node'. 
</code></pre>

<p>I'm presuming this is because I can only assign to a const Node. Is there anyway for my to cast away this error? Remember this is only a mock class. I'm simply trying to record the value passed into operator()() so I can check it in my unit test.</p>
