[Insight-developers] SmartPointer and Get/Set Input/Output
Bill Hoffman
bill.hoffman at kitware.com
Wed Sep 6 15:30:59 EDT 2000
One more note on the SmartPointer type conversion.
During construction, the = operator will not cast smart pointers to
parent classes, so you have to use the constructor calling conversion
when initializing smart pointers.
For example (given class A and B where B inherits from A) :
// Create a B smartpointer
B::Pointer bptr(B::New());
// This will NOT compile
A::Pointer p = bptr;
// This will compile
A::Pointer p(bptr);
-Bill
More information about the Insight-developers
mailing list