Closed GoogleCodeExporter closed 9 years ago
There are two possible problems:
- performance, as you mentioned
- accidental copies can make the code behave incorrectly - xml_document is
different in semantics from xml_node, so making a function that accepts
xml_document by value is probably incorrect.
Still, I do not see any problems with explicit copy constructor; I'll add this
to my task list.
Original comment by arseny.k...@gmail.com
on 30 Aug 2010 at 3:44
excellent! Thank you again ;-)
Original comment by wein...@gmail.com
on 30 Aug 2010 at 3:50
There were some problems with explicit copy-constructors - the difference
between explicit and implicit is hidden in a lot of generic code, so the intent
to make the dangerous and slow operation explicit can not be fulfilled.
For that reason, there is a special function, xml_document::reset(), that can
be used with one argument; the equivalent for
xml_document doc(otherdoc);
would be
xml_document doc;
doc.reset(otherdoc);
This is implemented in pugixml-1.0.
Original comment by arseny.k...@gmail.com
on 31 Oct 2010 at 6:26
Original issue reported on code.google.com by
wein...@gmail.com
on 26 Aug 2010 at 9:53