This is an infinite recursion. Function swap() works like this:
void swap(Type & a, Type & b) {
Type tmp = a; \
a = b; -> here it calls your operator=
b = tmp; /
}
You have to assign all class atributes from _3D to this
this->a = _3D.a;
this->b = _3d.b;
...
Or you can use memcpy(this, &_3D, sizeof(_3D))
, but ONLY if your class doesn't contain other objects, but only basic types.