Re: Are stack+heap classes possible in D?

2015-06-19 Thread Shachar Shemesh via Digitalmars-d-learn
On 14/06/15 04:31, Adam D. Ruppe wrote: On Sunday, 14 June 2015 at 00:52:20 UTC, FujiBar wrote: I have read that in D structs are always allocated on the stack while classes are always allocated on the heap. That's not true; it is a really common misconception. Putting a struct on the heap is

Re: Implementing SmartPtr - compiler bug?

2014-10-27 Thread Shachar Shemesh via Digitalmars-d-learn
On 27/10/14 11:31, Szymon Gatner wrote: Right, sorry. Tho I admit I made assumptions since that was not the full code. I've opened a bug. It has a fully contained sample (that does not, in fact, implement smartptr). https://issues.dlang.org/show_bug.cgi?id=13661

Implementing SmartPtr - compiler bug?

2014-10-27 Thread Shachar Shemesh via Digitalmars-d-learn
For reasons I won't go into (but should be fairly obvious), I am trying to write code that does not rely on the garbage collector. As such, I'm using reference counting structs allocated on a pool. To keep things sane, I'm trying to use RAII semantics, and to that end, a smart pointer that cal

GDB: Internal error: `this' is not an aggregate

2014-10-18 Thread Shachar Shemesh via Digitalmars-d-learn
I am trying to debug an application compiled with no optimizations with dmd v2.065. I am trying to debug with gdb 7.7-0ubuntu3.1. When I try to access certain variables (some local, some class members), here is the session I am getting: (gdb) p stripeWidth Internal error: `this' is not an a

Re: Why does this not work?

2014-09-17 Thread Shachar Shemesh via Digitalmars-d-learn
On 17/09/14 16:32, ketmar via Digitalmars-d-learn wrote: On Wed, 17 Sep 2014 13:20:13 + Shachar via Digitalmars-d-learn wrote: From http://dlang.org/type, under Usual Arithmetic Conversions: 4. Else the integer promotions are done on each operand, followed by: 1. If both are the sa