std::allocator<_Ty>::deallocate : cannot convert parameter 1 from 'X' to 'Y'
<p>I'm upgrading some C++ code from VisualStudio 6 towards VisualStudio 2008.</p>

<p>There is a class "GenExportableTree" which looks a lot like xtree from Dinkumware <a href="http://www.dinkumware.com/xtree.txt" rel="nofollow">http://www.dinkumware.com/xtree.txt</a></p>

<p>When compiling the library which contains this GenExportableTree, I get the following error:</p>



<pre class="lang-none prettyprint-override"><code>Error   37  error C2664: 'std::allocator&lt;_Ty&gt;::deallocate' : cannot convert 
parameter 1 from 'std::CGenExportableTree&lt;_K,_Ty,_Kfn,_Pr,_A&gt;::_Node *' to 
'CCfwSchemaInfo *'  
</code></pre>

<p>which are the following lines:</p>

<pre><code>void _Freenode(_Nodeptr _S)
        {
            allocator.deallocate( _S, 1); 
        }
</code></pre>

<p>Some extra info:
The you can find the complete implementation of the GenExportableTree under the dinkumware link above.</p>

<p>Where the CCfwSchemaInfo comes around the corner I can find following declarations:</p>

<pre><code>typedef CGenExportableMap&lt;wstring, CCfwSchemaInfo, GenNoCaseWString&gt; CfwSchemaTable;
</code></pre>

<p>The definition of the CGenExportableMap is as follows:</p>

<pre><code>template&lt;class _K, class _Ty, class _Pr = less&lt;_K&gt;,
    class _A = allocator&lt;_Ty&gt; &gt;
    class CGenExportableMap {
public:
    typedef CGenExportableMap&lt;_K, _Ty, _Pr, _A&gt; _Myt;
    typedef pair&lt;const _K, _Ty&gt; value_type;
....
....

    typedef _K key_type;
    typedef _Ty referent_type;
    typedef _Pr key_compare;
    typedef _A allocator_type;
    typedef  typename _A::reference _Tref;
    typedef CGenExportableTree&lt;_K, value_type, _Kfn, _Pr, _A&gt; _Imp;
</code></pre>

<p>In this last line is where the GenExportableTree gets used in the GenExportableMap definition.</p>

<p>As this previously all compiled correctly under vs6, I guess actually everything is correct - probably the compiler is just more strictly now  - so where should I start looking to find the error the compiler is complaining about? And how should i resolve this one?</p>

<p>Thanks!</p>
