You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I fail to see a way in which this user-defined conversion can lead to a serious issue (i.e., the pointer being deleted during a function call), I think this operator allows for the compiler to perform conversions we might not be aware of.
The only drawback (that I can see) of removing this operator is to precede the name of the TPZAutoPointer<T> instance with *, as with raw pointers. And I think the code would actually be clearer.
#55 would of course solve this issue, but I don't see it happening so soon...
The text was updated successfully, but these errors were encountered:
When passing an object as reference, the called method is not "supposed" to call the destructor on the address of the object it received. By the same token, as the user can ask for the address of the first element of a full matrix, he "could" delete it...
While I fail to see a way in which this user-defined conversion can lead to a serious issue (i.e., the pointer being deleted during a function call), I think this operator allows for the compiler to perform conversions we might not be aware of.
The only drawback (that I can see) of removing this operator is to precede the name of the
TPZAutoPointer<T>
instance with*
, as with raw pointers. And I think the code would actually be clearer.#55 would of course solve this issue, but I don't see it happening so soon...
The text was updated successfully, but these errors were encountered: