[vtk-developers] copy constructor and operator=

William A. Hoffman bill.hoffman at kitware.com
Thu Oct 4 23:50:16 EDT 2001


This was a move to help the coverage improve.   If you are getting errors, 
it means that you have
classes that still try to implement these functions, or do not implement 
them at all.   If there
is no implementation in a class, the compiler provides one, that will call 
the super-class, which
is not there, and causes the undefined error.  So, to fix your problem, 
remove all of the {} implementations
in your classes, then make sure they all declare the copy constructor and 
operator= as private, but do
not have implementations.

-Bill


At 09:59 PM 10/4/2001 -0400, Volpe, Christopher R (CRD) wrote:
>Hi folks-
>
>   I just did an update (from the old tree, no I haven't migrated yet) and 
> picked up some changes that
>were made on August 10th. These changes removed the implementations of the 
>copy constructor and
>operator=, apparently from all objects, though I haven't checked 
>thoroughly. I have a handful of
>classes in my "local" toolkit directory, and despite removing the 
>offending null implementations in
>my header files (just deleting the "{}" after the declarations), I still 
>get a barrage of link errors
>regarding these two methods. Perhaps someone could explain to me what the 
>current standard operating
>procedure is for defining classes, with regard to these two methods. I've 
>tried deleting all obj
>files and libs, doing a clean build, and still I come up with the same 
>link errors. (I'm using MS
>Visual C++ V6.0.) I've noticed that the header files for other objects 
>declare thse two methods, but
>there's no definition of them either in the header or the cxx file. Has 
>anyone else gotten bit by
>this, and figured out the solution? I'm sure it must be something simple, 
>but at the moment it seems
>to elude me.
>
>thanks,
>Chris
>_______________________________________________
>vtk-developers mailing list
>vtk-developers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/vtk-developers




More information about the vtk-developers mailing list