Yes - it is a bug in the copy constructor for Vector3D. Thanks for
spotting it :-).
The current code reads;
/** Construct from the passed vector - this assumes that
the vector is already in internal units */
template<class T>
SIRE_OUTOFLINE_TEMPLATE
Vector3D<T>::Vector3D(const Vector &v)
{
sc[0] = T(v.x());
sc[1] = T(v.y());
sc[3] = T(v.z());
}
It should be changed to;
/** Construct from the passed vector - this assumes that
the vector is already in internal units */
template<class T>
SIRE_OUTOFLINE_TEMPLATE
Vector3D<T>::Vector3D(const Vector &v)
{
sc[0] = T(v.x());
sc[1] = T(v.y());
sc[2] = T(v.z());
}
(the variable sc[3] was being used instead of sc[2]. I am surprised
that this never caused a crash!)
I've updated the code in "devel", which will be committed during my next commit.
Cheers,
Christopher