Re: How should class objects created in betterC be destroyed

2023-11-06 Thread zoe via Digitalmars-d-learn
On Monday, 6 November 2023 at 16:08:41 UTC, ryuukk_ wrote: Here is how adam seems to be doing it: https://github.com/adamdruppe/webassembly/blob/731a7033174127c0a6dd4f23eabdb440adab286b/arsd-webassembly/object.d#L650-L681 Specially here: ```D void destroy(bool initialize = true, T)(T obj) if (

Re: How should class objects created in betterC be destroyed

2023-11-06 Thread Paul Backus via Digitalmars-d-learn
On Monday, 6 November 2023 at 05:30:02 UTC, zoe wrote: I customized object.d in -betterc mode and created NEW templates, with modules I can seemingly create classes without extern(C++) mode, and type conversions in function calls seem to work fine. But when destroy doesn't find a way to call th

Re: How should class objects created in betterC be destroyed

2023-11-06 Thread ryuukk_ via Digitalmars-d-learn
Here is how adam seems to be doing it: https://github.com/adamdruppe/webassembly/blob/731a7033174127c0a6dd4f23eabdb440adab286b/arsd-webassembly/object.d#L650-L681 Specially here: ```D void destroy(bool initialize = true, T)(T obj) if (is(T == class)) { (..) else { // Bypass over

Re: How should class objects created in betterC be destroyed

2023-11-06 Thread ryuukk_ via Digitalmars-d-learn
Please tag your code accordingly, as is it's unreadable ```D // your code here ``` (tick the "Enable Markdown" too, next to the Send button)

Re: How should class objects created in betterC be destroyed

2023-11-05 Thread zoe via Digitalmars-d-learn
On Monday, 6 November 2023 at 05:52:18 UTC, Imperatorn wrote: On Monday, 6 November 2023 at 05:30:02 UTC, zoe wrote: I customized object.d in -betterc mode and created NEW templates, with modules I can seemingly create classes without extern(C++) mode, and type conversions in function calls see

Re: How should class objects created in betterC be destroyed

2023-11-05 Thread zoe via Digitalmars-d-learn
On Monday, 6 November 2023 at 05:52:18 UTC, Imperatorn wrote: On Monday, 6 November 2023 at 05:30:02 UTC, zoe wrote: I customized object.d in -betterc mode and created NEW templates, with modules I can seemingly create classes without extern(C++) mode, and type conversions in function calls see

Re: How should class objects created in betterC be destroyed

2023-11-05 Thread Imperatorn via Digitalmars-d-learn
On Monday, 6 November 2023 at 05:30:02 UTC, zoe wrote: I customized object.d in -betterc mode and created NEW templates, with modules I can seemingly create classes without extern(C++) mode, and type conversions in function calls seem to work fine. But when destroy doesn't find a way to call th