Re: How to do "C++ classes"?

2021-09-20 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Monday, 20 September 2021 at 15:56:44 UTC, Ferhat Kurtulmuş wrote: On Monday, 20 September 2021 at 15:45:08 UTC, Adam D Ruppe wrote: On Monday, 20 September 2021 at 15:35:02 UTC, Ferhat Kurtulmuş wrote: I thought it's stack-allocated and scoped. It is. But when I try to return a class

Re: How to do "C++ classes"?

2021-09-20 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Monday, 20 September 2021 at 15:45:08 UTC, Adam D Ruppe wrote: On Monday, 20 September 2021 at 15:35:02 UTC, Ferhat Kurtulmuş wrote: I thought it's stack-allocated and scoped. It is. But when I try to return a class instance from a function, it still works? dmd only makes that an error

Re: How to do "C++ classes"?

2021-09-20 Thread Adam D Ruppe via Digitalmars-d-learn
On Monday, 20 September 2021 at 15:35:02 UTC, Ferhat Kurtulmuş wrote: I thought it's stack-allocated and scoped. It is. But when I try to return a class instance from a function, it still works? dmd only makes that an error if you specify `@safe` and i think `-dip1000`. Try adding one or

Re: How to do "C++ classes"?

2021-09-20 Thread Ferhat Kurtulmuş via Digitalmars-d-learn
On Saturday, 18 September 2021 at 22:16:32 UTC, Adam D Ruppe wrote: On Saturday, 18 September 2021 at 15:38:38 UTC, rempas wrote: I'm seeing in the page about "BeterC" and in the part about the [retained features](https://dlang.org/spec/betterc.html#retained), the #11 says about "COM classes

Re: How to do "C++ classes"?

2021-09-19 Thread rempas via Digitalmars-d-learn
On Saturday, 18 September 2021 at 22:16:32 UTC, Adam D Ruppe wrote: On Saturday, 18 September 2021 at 15:38:38 UTC, rempas wrote: I'm seeing in the page about "BeterC" and in the part about the [retained features](https://dlang.org/spec/betterc.html#retained), the #11 says about "COM classes

Re: How to do "C++ classes"?

2021-09-18 Thread Adam D Ruppe via Digitalmars-d-learn
On Saturday, 18 September 2021 at 15:38:38 UTC, rempas wrote: I'm seeing in the page about "BeterC" and in the part about the [retained features](https://dlang.org/spec/betterc.html#retained), the #11 says about "COM classes and C++ classes". What are the "C++ classes"? I tried to create a