[xsd-users] C++11, value semantics, and polymorphism
Klaim - Joël Lamotte
mjklaim at gmail.com
Tue Feb 19 06:14:09 EST 2013
On Mon, Feb 18, 2013 at 9:20 AM, Boris Kolpackov <boris at codesynthesis.com>wrote:
>
> Copy-on-write is a can of worms. It can be useful in certain controlled
> situations that is, where you can have a well defined read/write interface
> rather than "we return a reference but have no idea if the object will
> be modified or not" (which is what we have in XSD). In general-purpose
> code, however, it adds too many restrictions and/or complexity (see why
> COW is effectively no longer an option for std::string in C++11).
>
> So, no, I don't think COW is a good idea for XSD.
>
I see, you're the expert on this anyway (I never used COW, was just
wondering).
Can't wait to see the value semantic version. I don't know exactly what the
impact on performance will be
but I used it in my big projects, even move-only types, and it does clarify
a lot the user code.
The only problem is VS2012 being retarded with C++11 features, in
particular defaulting and deleting functions
which would make declarations far simpler if they were available.
Joel Lamotte
More information about the xsd-users
mailing list