On Sunday, 5 February 2017 at 21:51:14 UTC, Meta wrote:
On Sunday, 5 February 2017 at 20:36:57 UTC, Mark Fisher wrote:
I want to write a template:
static auto ref BindArg(alias Func,alias arg,args...)() {
return Func(arg,args);
}
where Func is called with 'arg' followed by the 'args'
On Sunday, 5 February 2017 at 20:36:57 UTC, Mark Fisher wrote:
I want to write a template:
static auto ref BindArg(alias Func,alias arg,args...)() {
return Func(arg,args);
}
where Func is called with 'arg' followed by the 'args'
parameters.
eg:
string f(string a,int b,int c);
BindA
On Sunday, 5 February 2017 at 20:36:57 UTC, Mark Fisher wrote:
static auto ref BindArg(alias Func,alias arg,args...)() {
return Func(arg,args);
}
[...]
BindArg(f,"1",2,3);
You forgot an exclamation mark there:
BindArg!(f,"1",2,3);
http://stackoverflow.com/questions/24600796/d-set-default-value-for-a-struct-member-which-is-a-multidimensional-static-arr/24754361#24754361
Dne 5.2.2017 v 21:33 berni via Digitalmars-d-learn napsal(a):
With X not known at compile time:
auto arr = new int[][](X,X);
for (int i=0;i
Is there an
I want to write a template:
static auto ref BindArg(alias Func,alias arg,args...)() {
return Func(arg,args);
}
where Func is called with 'arg' followed by the 'args' parameters.
eg:
string f(string a,int b,int c);
BindArg(f,"1",2,3);
The compiler throws an error:
Error: function f (str
With X not known at compile time:
auto arr = new int[][](X,X);
for (int i=0;i
Is there anything better for this? I mean, the program will fill
the array with zeroes, just to overwrite all of them with -1.
That's wasted execution time and doesn't feel D-ish to me.
Le 05/02/2017 à 18:32, Basile B. a écrit :
On Sunday, 5 February 2017 at 14:59:04 UTC, Xavier Bigand wrote:
Hi,
I am trying to create an allocator that don't use the GC, and I have
issues for the initialization of member before calling the constructor.
Here is my actual code :
mixin template N
On Sunday, 5 February 2017 at 14:59:04 UTC, Xavier Bigand wrote:
Hi,
I am trying to create an allocator that don't use the GC, and I
have issues for the initialization of member before calling the
constructor.
Here is my actual code :
mixin template NogcAllocator(T)
{
static T
Hi,
I am trying to create an allocator that don't use the GC, and I have
issues for the initialization of member before calling the constructor.
Here is my actual code :
mixin template NogcAllocator(T)
{
static TnogcNew(T, Args...)(Args args) @nogc
{
imp
On Sunday, 5 February 2017 at 04:22:30 UTC, rikki cattermole
wrote:
On 05/02/2017 5:02 PM, thedeemon wrote:
snip
It may look so from a distance. But in my experience it's not
that bad.
In most software I did in D it did not matter really (it's
either 64-bit
or short lived programs) and the co
On Sunday, February 05, 2017 02:19:35 Era Scarecrow via Digitalmars-d-learn
wrote:
> On Friday, 3 February 2017 at 18:37:15 UTC, Johan Engelen wrote:
> > The error is in this line. Instead of assigning to the
> > `postProc` at module scope, you are defining a new local
> > variable and assigning t
11 matches
Mail list logo