On Thursday, 12 January 2017 at 00:30:33 UTC, Ignacious wrote:
On Wednesday, 11 January 2017 at 19:23:10 UTC, Razvan Nitu
wrote:
[...]
If you change the return type to a void* your code basically
works.
void* makeMultidimensionalArray(T, Allocator)(auto ref
Allocator alloc, size_t[] leng
On Wednesday, 11 January 2017 at 19:23:10 UTC, Razvan Nitu wrote:
Hi,
I am currently trying to create a function
makeMultidimensionalArray which allocates memory for a
multidimensional array.
You were very close to the answer:
auto makeMultidimensionalArray(int N, T, Allocator)(auto ref
Al
On 10.01.2017 04:02, Elronnd wrote:
Thank you! Would you mind telling me what you changed aside from pow()
and powm()?
1. This code:
// make 2^a = integer-1
while ((integer-1)%(pow(bigint(2), a))!=0)
a--;
m = (integer-1) / pow(bigint(2), a);
a starts out as integer-1, so this computes ma
The problem and the code:
import std.stdio: writeln;
import core.stdc.stdlib: malloc;
struct Impl {
ubyte[8] payload;
}
class Foo {
Impl *impl;
alias impl this;
this()
{
impl = cast(Impl*) malloc(Impl.sizeof);
}
}
class Foo2 {
ubyte[8] payload;
}
void main
Hello,
I would like to get as a result a list of all classes that
implement a specific user interface. Is there a way to do this?
On Thursday, 12 January 2017 at 20:58:33 UTC, Max wrote:
I would like to get as a result a list of all classes that
implement a specific user interface. Is there a way to do this?
Not at compile time, it is possible there are child classes in
separately compiled modules or libraries (or even r
Hiding a Foo right after Impl can be a solution. However, you need to
pass 't', not '&t' to the C function because
- Although it may be unexpected, cast(void*) is the specified way of
getting the address of a class object
- Taking the address of a class reference (which 't' is one), is just
I'm trying to automate a build process for a project of mine, and
I want to get the path to the MSVC toolchain DMD is using. I
don't want to hard code any paths that may not work on some
people's set-ups.
I know there are some environmental variables such as
VS140COMNTOOLS, VS120COMNTOOLS, et
On Friday, 13 January 2017 at 03:21:52 UTC, Jeremy DeHaan wrote:
I've also thought of parsing the PATH to figure out where dmd
is installed and extract the info from the sc.ini file.
I have both VS2013 and VS2015 installed. I have to use a project
specific sc.ini file to match each project to
Unlike array1 + array2, how can i merge arrays such that:
[a1, a1, a2, a1, a1, a2, a1] //uniform order
where a1 = child of array1,
a2 = child of array2
using a built-in function/algorithm (is/are there anything(s) in
Phobos for this?). No manual approach.
Thanks. Ali.
My previous post is not clear that I have to store class
reference(object pointer) in void*.
My actual code is try to use libuv in D.
// genarated from uv.h, only two fields is used: 'data', 'type'.
// the document of 'data': "Space for user-defined arbitrary
data. libuv does not
11 matches
Mail list logo