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
I agree with Boris, the current implementation strikes me as type-unsafe and we should be able to fix it without increasing code size.
I would suggest removing the template parameter from Ptr<> in this initial PR, that's really just hiding a typecast under a less obvious syntax now. Potentially unsafe casts are the last thing we want to hide in a benign-looking accessor function.
Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.57. Please mark this comment with 👍 or 👎 to give our bot feedback!
rwalker-apple
changed the title
Template parameter in ScopedBuffer is no more than an obscured cast, should be removed
Template parameter in ScopedBuffer::Ptr is no more than an obscured cast, consider removal
Oct 2, 2020
I agree with Boris, the current implementation strikes me as type-unsafe and we should be able to fix it without increasing code size.
I would suggest removing the template parameter from Ptr<> in this initial PR, that's really just hiding a typecast under a less obvious syntax now. Potentially unsafe casts are the last thing we want to hide in a benign-looking accessor function.
Originally posted by @mspang in #2987 (comment)
The text was updated successfully, but these errors were encountered: