On Wednesday, 19 September 2012 at 21:36:56 UTC, Namespace wrote:
I count it to destroy it if it isn't used anymore.
What I'm saying though is that when your stacked_obj goes out
of scope, it gets destroyed, 100% of the time. The chunk
disappears, along with any object inside it. When that
On Thursday, 20 September 2012 at 08:10:36 UTC, Namespace wrote:
You're right.
This is my next try: http://dpaste.dzfl.pl/02b32d33
Do you have anything else to say? :)
I think it looks good, but I'm unsure about move, or allowing
pass by value:
Classes can't be memcopied the way structs
Am Thu, 20 Sep 2012 10:11:37 +0200
schrieb Namespace rswhi...@googlemail.com:
You're right.
This is my next try: http://dpaste.dzfl.pl/02b32d33
Do you have anything else to say? :)
I think it shouldn't be possible to copy an OnStack struct. The
destructor is run for every copy, but the
Am Thu, 20 Sep 2012 12:06:28 +0200
schrieb monarch_dodra monarchdo...@gmail.com:
On Thursday, 20 September 2012 at 08:10:36 UTC, Namespace wrote:
You're right.
This is my next try: http://dpaste.dzfl.pl/02b32d33
Do you have anything else to say? :)
I think it looks good, but I'm unsure
So I should disable the copy ctor (@disable this(this)) and drop
move, right?
As you can See if I pass a OnStack to function/class i'm using
.get all the Time. The only other method IMO would be to pass it
as OnStack by value and Store it in the other class also as
OnStack, right?
On Thursday, 20 September 2012 at 12:32:03 UTC, Namespace wrote:
So I should disable the copy ctor (@disable this(this)) and
drop move, right?
Yes, but at that point, what you have is scoped!T re-implemented
:/
As you can See if I pass a OnStack to function/class i'm using
.get all the Time.
On Thursday, 20 September 2012 at 14:02:01 UTC, monarch_dodra
wrote:
On Thursday, 20 September 2012 at 12:32:03 UTC, Namespace wrote:
So I should disable the copy ctor (@disable this(this)) and
drop move, right?
Yes, but at that point, what you have is scoped!T
re-implemented :/
As you can
On Thursday, 20 September 2012 at 14:09:29 UTC, Namespace wrote:
http://dpaste.dzfl.pl/edit/361a54eb
With
[code]
@disable this(this);
[/code]
this don't work (as expected). But with the copy ctor but
without .get you earn a segmentation fault (as you can see).
So you can disable the copy ctor
On Thursday, 20 September 2012 at 14:15:23 UTC, monarch_dodra
wrote:
On Thursday, 20 September 2012 at 14:09:29 UTC, Namespace wrote:
http://dpaste.dzfl.pl/edit/361a54eb
With
[code]
@disable this(this);
[/code]
this don't work (as expected). But with the copy ctor but
without .get you earn a
On Thursday, 20 September 2012 at 15:04:48 UTC, Namespace wrote:
On Thursday, 20 September 2012 at 14:15:23 UTC, monarch_dodra
wrote:
On Thursday, 20 September 2012 at 14:09:29 UTC, Namespace
wrote:
http://dpaste.dzfl.pl/edit/361a54eb
With
[code]
@disable this(this);
[/code]
this don't work
I expect nothing, my only intention was to show you, that this
cannot work. But that it works with an explicit cast is very
impressive. I thought the alias this does it automatically.
I'm learning too. ;)
Is that possible?
I can initialize an object with scope or, in feature, with
scoped, directly on the stack but is it also possible to move an
existing object from the heap to the stack?
On Wednesday, 19 September 2012 at 13:32:42 UTC, Namespace wrote:
Is that possible?
I can initialize an object with scope or, in feature, with
scoped, directly on the stack but is it also possible to move
an existing object from the heap to the stack?
I tried this:
On Wed, 19 Sep 2012 15:45:21 +0200, Namespace rswhi...@googlemail.com
wrote:
On Wednesday, 19 September 2012 at 13:32:42 UTC, Namespace wrote:
Is that possible?
I can initialize an object with scope or, in feature, with scoped,
directly on the stack but is it also possible to move an
Thanks, I will use __traits(classInstanceSize, A);
But it does not work either.
On Wednesday, 19 September 2012 at 17:08:28 UTC, monarch_dodra
wrote:
On Wednesday, 19 September 2012 at 14:16:31 UTC, Namespace
wrote:
Thanks, I will use __traits(classInstanceSize, A);
But it does not work either.
This is because classes are already pointers. when you write
a, you are
Result:
http://dpaste.dzfl.pl/24988d8f
On Wednesday, 19 September 2012 at 19:24:34 UTC, Namespace wrote:
Result:
http://dpaste.dzfl.pl/24988d8f
I like it, but how can something placed on the stack be reference
counted? The chunk is also placed on the stack, so it doesn't
really make sense to me: When the object goes out of scope,
18 matches
Mail list logo