Closed happydpc closed 4 years ago
@happydpc It is declared as protected. Which compiler / version are you using ?
VS2017, I added a default implementation, with just assigning the validFlag_. Now it works.
@happydpc Ok. Could you send a pull request ?
Ok, I will do that.
Why does it not complain about the missing copy constructor then ? I don't understand
@mhugo the reason is is because clearly @happydpc is assigning to an already existing SFCGAL::Geometry
(subclass) object, rather than creating a new one. Hence, in the former the copy-constructor will not be used, whereas in the latter it would be and the statement would not compile.
It would however be preferable for both the copy constructor and assignment operators to be public if one is made public so that the convenience of initialisation and assignment can be conducted in a single statement.
@mhugo can this issue now be closed as done?
thanks @mhugo !
The operator = in Geometry has not been implemented. It causes the compile error:
triangulatePolygon.obj : error LNK2001: "protected: class SFCGAL::Geometry const & cdecl SFCGAL::Geometry::operator=(class SFCGAL::Geometry const &)" (??4Geometry@SFCGAL@@IEAAAEBV01@AEBV01@@Z) 1>ForceZOrderPoints.obj : error LNK2001: "protected: class SFCGAL::Geometry const & cdecl SFCGAL::Geometry::operator=(class SFCGAL::Geometry const &)" (??4Geometry@SFCGAL@@IEAAAEBV01@AEBV01@@Z) 1>ConstraintDelaunayTriangulation.obj : error LNK2001: "protected: class SFCGAL::Geometry const & cdecl SFCGAL::Geometry::operator=(class SFCGAL::Geometry const &)" (??4Geometry@SFCGAL@@IEAAAEBV01@AEBV01@@Z) 1>triangulateInGeometrySet.obj : error LNK2001: "protected: class SFCGAL::Geometry const & cdecl SFCGAL::Geometry::operator=(class SFCGAL::Geometry const &)" (??4Geometry@SFCGAL@@IEAAAEBV01@AEBV01@@Z) 1>triangulate2DZ.obj : error LNK2001: "protected: class SFCGAL::Geometry const & __cdecl SFCGAL::Geometry::operator=(class SFCGAL::Geometry const &)" (??4Geometry@SFCGAL@@IEAAAEBV01@AEBV01@@Z)