Bug 21421 – core.stdcpp.new_.cpp_delete does not work with classes
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-11-24T10:40:45Z
Last change time
2020-12-14T09:40:32Z
Keywords
pull
Assigned to
No Owner
Creator
Nathan S.
Comments
Comment #0 by n8sh.secondary — 2020-11-24T10:40:45Z
Code:
---
void cpp_delete(T)(T instance) if (is(T == class))
{
destroy!false(instance);
__cpp_delete(instance);
}
---
Problem: __cpp_delete requires "void*" argument and classes don't implicitly convert to void*.
Comment #1 by dlang-bot — 2020-11-24T10:41:34Z
@n8sh updated dlang/druntime pull request #3284 "core.stdcpp.new_.cpp_delete unnecessarily requires destruction to be @nogc" fixing this issue:
- Fix Issue 21421 - core.stdcpp.new_.cpp_delete does not work with classes
https://github.com/dlang/druntime/pull/3284
Comment #2 by dlang-bot — 2020-12-14T09:40:32Z
dlang/druntime pull request #3284 "core.stdcpp.new_.cpp_delete unnecessarily requires destruction to be @nogc" was merged into stable:
- a0acfb2f58fd688a7a4dcad5e51441e78fcba26f by Nathan Sashihara:
Fix Issue 21421 - core.stdcpp.new_.cpp_delete does not work with classes
https://github.com/dlang/druntime/pull/3284