On Tuesday, 23 May 2017 at 16:38:14 UTC, Stanislav Blinov wrote:
Ah, now I think I get it. You want to store a single delegate
that could be called with different sets of arguments? No, you
can't do that: you need an actual delegate instance, and for
that, you need to know the signature, at lea
On Tuesday, 23 May 2017 at 18:14:34 UTC, ag0aep6g wrote:
Something like this:
import core.vararg;
import std.meta: AliasSeq, staticMap;
import std.traits: isCopyable;
struct A
{
void delegate(...) dg;
auto fun(T, U ...)(T t, auto ref U u)
{
template UncopyableToPointer(
On 05/23/2017 01:30 PM, Alex wrote:
And no, I can't pass it by adress, as I don't know apriori, whether the
very parameter which gets the random generator is already a part of the
variadic parameters, or a well defined ref parameter.
A (run-time) variadic delegate isn't flexible like that. Whe
On Tuesday, 23 May 2017 at 16:48:31 UTC, Nordlöw wrote:
On Tuesday, 23 May 2017 at 16:46:18 UTC, Nordlöw wrote:
http://forum.dlang.org/post/wvulryummkqtskiwr...@forum.dlang.org
Correction; should be:
https://github.com/nordlow/phobos-next/blob/a324f16515bd1c3c1185ba0482dae2886d811bb1/src/soa.
On Monday, 15 May 2017 at 19:52:03 UTC, Nordlöw wrote:
soa.d-mixin-143(143,7): Error: variable
soa.SOA!(S).SOA.container0LU cannot be further field because it
will change the determined SOA size
soa.d-mixin-143(143,28): Error: variable
soa.SOA!(S).SOA.container1LU cannot be further field becaus
On Tuesday, 23 May 2017 at 16:46:18 UTC, Nordlöw wrote:
http://forum.dlang.org/post/wvulryummkqtskiwr...@forum.dlang.org
Correction; should be:
https://github.com/nordlow/phobos-next/blob/a324f16515bd1c3c1185ba0482dae2886d811bb1/src/soa.d
On Tuesday, 23 May 2017 at 11:45:13 UTC, Alex wrote:
On Tuesday, 23 May 2017 at 11:05:09 UTC, Stanislav Blinov wrote:
void variadic(Args...)(auto ref Args args) { /* ... */ }
This infers whether you pass lvalues or rvalues. If passing
further down the chain of such calls is needed, one can use
https://dpaste.dzfl.pl/74d67cfca3e8
On Tuesday, 23 May 2017 at 07:40:21 UTC, biocyberman wrote:
Adding DDOC support for D Mode require some more work
obviously. I will see if I can make some changes to that. For
the time being, I would like to know which editors people are
using. Or is it a plain black and white editor ?
I use
On Tuesday, 23 May 2017 at 07:40:21 UTC, biocyberman wrote:
On Monday, 22 May 2017 at 15:33:36 UTC, Russel Winder wrote:
[...]
Adding DDOC support for D Mode require some more work
obviously. I will see if I can make some changes to that. For
the time being, I would like to know which editor
On Tuesday, 23 May 2017 at 11:05:09 UTC, Stanislav Blinov wrote:
void variadic(Args...)(auto ref Args args) { /* ... */ }
This infers whether you pass lvalues or rvalues. If passing
further down the chain of such calls is needed, one can use
std.functional : fowrard :
yes...
void variadic
On Tuesday, 23 May 2017 at 10:42:54 UTC, Nicholas Wilson wrote:
On Tuesday, 23 May 2017 at 10:30:56 UTC, Alex wrote:
On Monday, 22 May 2017 at 21:44:17 UTC, ag0aep6g wrote:
With that kind of variadics, you're not dealing with a
template. A (run-time) variadic delegate is an actual
delegate, i.
On Tuesday, 23 May 2017 at 10:30:56 UTC, Alex wrote:
On Monday, 22 May 2017 at 21:44:17 UTC, ag0aep6g wrote:
With that kind of variadics, you're not dealing with a
template. A (run-time) variadic delegate is an actual
delegate, i.e. a value that can be passed around. But the
variadic stuff is
On Tuesday, 23 May 2017 at 10:42:54 UTC, Nicholas Wilson wrote:
On Tuesday, 23 May 2017 at 10:30:56 UTC, Alex wrote:
On Monday, 22 May 2017 at 21:44:17 UTC, ag0aep6g wrote:
With that kind of variadics, you're not dealing with a
template. A (run-time) variadic delegate is an actual
delegate, i.
On Tuesday, 23 May 2017 at 10:30:56 UTC, Alex wrote:
On Monday, 22 May 2017 at 21:44:17 UTC, ag0aep6g wrote:
With that kind of variadics, you're not dealing with a
template. A (run-time) variadic delegate is an actual
delegate, i.e. a value that can be passed around. But the
variadic stuff is
On Monday, 22 May 2017 at 21:44:17 UTC, ag0aep6g wrote:
With that kind of variadics, you're not dealing with a
template. A (run-time) variadic delegate is an actual delegate,
i.e. a value that can be passed around. But the variadic stuff
is a bit weird to use, and probably affects performance.
On Tue, 2017-05-23 at 07:40 +, biocyberman via Digitalmars-d-learn
wrote:
>
[…]
> Adding DDOC support for D Mode require some more work obviously.
> I will see if I can make some changes to that. For the time
> being, I would like to know which editors people are using. Or is
> it a plain b
On Monday, 22 May 2017 at 15:33:36 UTC, Russel Winder wrote:
On Mon, 2017-05-22 at 14:14 +, biocyberman via
Digitalmars-d-learn wrote:
Which one do you use? I am using Linux and Emacs for editing
other D source file. But the DDOC syntaxes and keywords are
not well high-lighted.
There has
On Tuesday, 23 May 2017 at 00:14:43 UTC, Mike Parker wrote:
On Monday, 22 May 2017 at 18:44:10 UTC, Andrew Edwards wrote:
There isn't any Windows specific section. Every function
pointer in the library is decorated in one of the following
two forms
void (APIENTRY *NAME)(PARAMS)
or
On Tuesday, 23 May 2017 at 01:02:59 UTC, Vladimir Panteleev wrote:
On Monday, 22 May 2017 at 21:03:42 UTC, Bastiaan Veelo wrote:
Is there a way to detect at CT that S has overlapping data
members, when an anonimous union is used as above?
I have an implementation here:
https://github.com/Cybe
On Monday, 22 May 2017 at 22:11:15 UTC, Stanislav Blinov wrote:
On Monday, 22 May 2017 at 21:03:42 UTC, Bastiaan Veelo wrote:
Is there a way to detect at CT that S has overlapping data
members, when an anonimous union is used as above?
There isn't a built-in one. The best I can muster at 1AM
On Tuesday, 23 May 2017 at 06:42:55 UTC, Timoses wrote:
The easiest way is probably casting:
```
import std.traits;
import std.bitmanip;
class Test {
byte[4] marray;
byte mbyte;
}
void main() {
auto value = [0x12, 0x23, 0x34, 0x45, 0x56];
auto test = cast(Test*) value.ptr;
}
``
22 matches
Mail list logo