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

Boris Kolpackov boris at codesynthesis.com
Fri Sep 19 03:51:29 EDT 2014


Hi Oliver,

Oliver Schneider <xsd-users at oli-obk.de> writes:

> I ran into another situation of the same kind.
> The idref class has constructors that'll happily take strings, char* and
> some others as arguments. It's really easy to accidentally use them.

Hm, I am not sure about this one. idref is a string. Here is a quote
from the documentation:

The idref class publicly inherits from and has the same set
of constructors as std::basic_string. It therefore can be
used as std::string [...]

Can you show some concrete examples where you found this dangerous.

Boris



More information about the xsd-users mailing list