On Thu, 2003-06-26 at 21:00, Hamish Mackenzie wrote: > You might be worried about... > > dom::document dom; > assert( &dom.root().document() == &dom ); > > I think this can work be made to work with > > bool operator ==( document * p1, document_ref * p2 ) > { > return p1->raw_ == p2->raw_; > } > > bool operator ==( document_ref * p1, document * p2 ) > { > return p1->raw_ == p2->raw_; > }
Actually that wouldn't work as &dom.root().document() would fail to compile. (not without caching document_ref in node_ref) But this might be ok.. dom::document doc; dom::document_ref doc2( doc.root().document() ); assert( &doc2 == &doc ); and... assert( doc2 == doc ); Can be implemented but ideally it would compare all the nodes in the document. -- Hamish Mackenzie <[EMAIL PROTECTED]> _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost