[xsd-users] template<typename C> type_(const C*) constructor creates unexpected empty copies of any pointer

Oliver Schneider xsd-users at oli-obk.de
Mon Sep 22 03:13:57 EDT 2014


Hi Boris,

> idref has a copy constructor and that's exactly what's called in this
> case. I guess the only solution I can think of is it pay attention ;-).

while true, isn't the purpose of the type and class system to prevent
accidents like this?

A copied idref object is not really of much use. You can only use it to
print the idref or to manually get the target through the root object.
Since it's unlikely that someone wishes to copy an idref, it should be
explicit, not implicit in my oppinion.

/Oliver



More information about the xsd-users mailing list