It's a copy.
Whether or not it's a deep copy depends on the implementation of XMLDocument. But it's probably safe to assume it's a deep copy.
EDIT:
And no, you should not pass &doc because that would give you a XMLDocument*
and not an XMLDocument
like your map requires.
Last edited on