[xsde-users] xsd/e: Compiler warnings from copy ctor of var_const_iterator (sequence.hxx:428)

Boris Kolpackov boris at codesynthesis.com
Tue Nov 3 08:17:39 EST 2020


Jonathan Haws <Jonathan.Haws at sdl.usu.edu> writes:

> The code seems to behave the same at runtime when I remove that copy
> constructor and just use the compiler default (which from what I can
> tell should produce nearly identical code). All versions of GCC that
> I have tried build properly and no issues at runtime.
> 
> Can you help me understand what is going on?

Yes, that copy assignment operator should not be necessary. However,
I've fixed this[1] by adding the matching copy constructor. From the
commit message:

"Instead of adding the copy constructor we could have also dropped the copy
assignment since it is identical to what would be implied. It's not, however,
clear why it was added in the first place (it was added before we started
tracking development with git). Chances are, some old and broken compiler is
confused by the other assignment operator. So to be on the safe side we
rather add the copy constructor."



> Is there a newer version of xsd/e that I can use?

3.2.0 is the latest official release. There are some pre-release
snapshots[2] but they don't include this fix. The easiest is
probably just to patch your copy of 3.2.0.


[1] https://git.codesynthesis.com/cgit/xsde/xsde/commit/?id=70bd99294d2054a69329c362a4c2d6f4bd0714b3
[2] https://codesynthesis.com/~boris/tmp/xsde/



More information about the xsde-users mailing list