title: Operator = is ambiguous (C++)
body: <p>I have the following in a for loop and the compiler says 'operator = is ambiguous'.  Not sure how to solve this issue, can anyone help?</p>
  
  <pre><code>rootelement = document-&gt;getDocumentElement();
      boost::interprocess::unique_ptr&lt;DOMNodeIterator, release_deleter&gt; itera (document-&gt;createNodeIterator(rootelement, DOMNodeFilter::SHOW_ALL, NULL, true));
      for(boost::interprocess::unique_ptr&lt;DOMNode, release_deleter&gt; current (itera-&gt;nextNode()); current != 0; current = boost::interprocess::unique_ptr&lt;DOMNode, release_deleter&gt; (itera-&gt;nextNode()))  // Last assignment on current is ambiguous
  </code></pre>
  
  <p>Full error:</p>
  
  <p>*</p>
  
  <pre><code>\XMLDocument.cpp(193) : error C2593: 'operator =' is ambiguous
          c:\Program Files\boost\boost_1_44\boost\interprocess\smart_ptr\unique_ptr.hpp(249): could be 'boost::interprocess::unique_ptr&lt;T,D&gt; &amp;boost::interprocess::unique_ptr&lt;T,D&gt;::operator =(int boost::interprocess::unique_ptr&lt;T,D&gt;::nat::* )'
          with
          [
              T=xercesc_3_1::DOMNode,
              D=release_deleter
          ]
          unique_ptr.hpp(211): or       'boost::interprocess::unique_ptr&lt;T,D&gt; &amp;boost::interprocess::unique_ptr&lt;T,D&gt;::operator =(boost::interprocess::rv&lt;boost::interprocess::unique_ptr&lt;T,D&gt;&gt; &amp;)'
          with
          [
              T=xercesc_3_1::DOMNode,
              D=release_deleter
          ]
          while trying to match the argument list '(boost::interprocess::unique_ptr&lt;T,D&gt;, boost::interprocess::unique_ptr&lt;T,D&gt;)'
          with
          [
              T=xercesc_3_1::DOMNode,
              D=release_deleter
          ]
          and
          [
              T=xercesc_3_1::DOMNode,
              D=release_deleter
          ]
    \XMLDocument.cpp(193) : see reference to class template instantiation 'boost::interprocess::detail::unique_ptr_error&lt;T&gt;' being compiled
          with
          [
              T=boost::interprocess::unique_ptr&lt;xercesc_3_1::DOMNode,release_deleter&gt;
          ]
      XMLDocument.cpp(193) : see reference to class template instantiation 'boost::interprocess::detail::unique_ptr_error&lt;T&gt;' being compiled
          with
          [
              T=xercesc_3_1::DOMNode *
          ]
         \XMLDocument.cpp(193) : see reference to class template instantiation 'boost::interprocess::detail::unique_ptr_error&lt;T&gt;' being compiled
          with
          [
              T=xercesc_3_1::DOMNode *
          ]
          XMLDocument.cpp(192) : see reference to class template instantiation 'boost::int
  erprocess::detail::unique_ptr_error&lt;T&gt;' being compiled
          with
          [
              T=xercesc_3_1::DOMNodeIterator *
          ]
  </code></pre>
  
  <p>*</p>