digitalmars.D.learn - How to copy an object to separate allocated memory?
- Gary Willoughby (8/8) Jul 24 2014 I was reading Ali's book (http://ddili.org/ders/d.en/index.html)
- Daniel Gibson (2/8) Jul 24 2014 std.conv.emplace()
- John Colvin (2/10) Jul 24 2014 std.conv.emplace
- Justin Whear (2/10) Jul 24 2014 std.conv.emplace: http://dlang.org/phobos/std_conv.html#.emplace
- Justin Whear (2/14) Jul 24 2014 Wow, the ninja'ing is strong today.
- Gary Willoughby (2/21) Jul 24 2014 Lol, thanks all.
I was reading Ali's book (http://ddili.org/ders/d.en/index.html) and saw this piece of code on how to get the true size of an object: MyClass* buffer = cast(MyClass*)GC.calloc(__traits(classInstanceSize, MyClass) * 10); That got me thinking, how would i actually 'fill' this memory with instances of that class?
Jul 24 2014
Am 24.07.2014 19:05, schrieb Gary Willoughby:I was reading Ali's book (http://ddili.org/ders/d.en/index.html) and saw this piece of code on how to get the true size of an object: MyClass* buffer = cast(MyClass*)GC.calloc(__traits(classInstanceSize, MyClass) * 10); That got me thinking, how would i actually 'fill' this memory with instances of that class?std.conv.emplace()
Jul 24 2014
On Thursday, 24 July 2014 at 17:05:18 UTC, Gary Willoughby wrote:I was reading Ali's book (http://ddili.org/ders/d.en/index.html) and saw this piece of code on how to get the true size of an object: MyClass* buffer = cast(MyClass*)GC.calloc(__traits(classInstanceSize, MyClass) * 10); That got me thinking, how would i actually 'fill' this memory with instances of that class?std.conv.emplace
Jul 24 2014
On Thu, 24 Jul 2014 17:05:17 +0000, Gary Willoughby wrote:I was reading Ali's book (http://ddili.org/ders/d.en/index.html) and saw this piece of code on how to get the true size of an object: MyClass* buffer = cast(MyClass*)GC.calloc(__traits(classInstanceSize, MyClass) * 10); That got me thinking, how would i actually 'fill' this memory with instances of that class?
Jul 24 2014
On Thu, 24 Jul 2014 17:07:29 +0000, Justin Whear wrote:On Thu, 24 Jul 2014 17:05:17 +0000, Gary Willoughby wrote:Wow, the ninja'ing is strong today.I was reading Ali's book (http://ddili.org/ders/d.en/index.html) and saw this piece of code on how to get the true size of an object: MyClass* buffer = cast(MyClass*)GC.calloc(__traits(classInstanceSize, MyClass) * 10); That got me thinking, how would i actually 'fill' this memory with instances of that class?
Jul 24 2014
On Thursday, 24 July 2014 at 17:07:47 UTC, Justin Whear wrote:On Thu, 24 Jul 2014 17:07:29 +0000, Justin Whear wrote:Lol, thanks all.On Thu, 24 Jul 2014 17:05:17 +0000, Gary Willoughby wrote:Wow, the ninja'ing is strong today.I was reading Ali's book (http://ddili.org/ders/d.en/index.html) and saw this piece of code on how to get the true size of an object: MyClass* buffer = cast(MyClass*)GC.calloc(__traits(classInstanceSize, MyClass) * 10); That got me thinking, how would i actually 'fill' this memory with instances of that class?std.conv.emplace:
Jul 24 2014