Uh oh!
There was an error while loading. Please reload this page.
Enable unique_ptr holder with mixed Deleters between base and derived types - #1353
Conversation
jagerman
commented
Apr 9, 2018
LGTM. As I mentioned in #1317, this better matches the intentions of the check (which is really just meant to keep you from accidentally mixing |
One potential concern: What happens when you have a non-empty deleter that actually changes the memory layout of (It also seems like your holder could get misinterpreted, e.g. between |
jagerman
commented
Apr 22, 2018
I don't think it's a problem since |
EricCousineau-TRI
commented
Apr 23, 2018
I'm not sure if I completely understand; can I ask which casting you're referring to, specifically between (Asking in the context of #1237 where, at PR's present state, |
EricCousineau-TRI
commented
May 2, 2018
Just did a quick test on this branch: Takeaways:
The above caveat seems like a rare edge case, and would seem like a general design mistake, so I think this PR is fine as-is; could be addressed at a later point, perhaps with #1161. |
trelau
commented
Jul 5, 2018
Rebased on master. Any idea why a single configuration is failing for xcode? |
trelau
commented
Jul 22, 2018
justbuchanan
commented
Oct 21, 2018
+1 for this PR. What else needs to be done before it can be merged? I'de be happy to help if possible. |
-Recognize "std::unique_ptr<T, D>" as a default holder even if "D" doesn't match between base and derived holders
trelau
commented
Nov 11, 2018
anything in particular holding back this PR? happy to help if there are any requests. |
wjakob
commented
Nov 11, 2018
It looks good to me. The reason for the delay is my (very) limited time budget for maintaining this project. |
Recognize "std::unique_ptr<T, D>" as a default holder even if "D" doesn't match between base and derived types. Currently, if "D" doesn't match you get a "type does not have a non-default holder type while its base does" error.
Reference this issue: #1317
And this solution: #1317 (comment)
An example where this will remove some boilerplate code is described here.