On Tuesday, 31 May 2016 at 20:46:37 UTC, Basile B. wrote:
Yes this can be done, you must use the getOverload trait:
https://dlang.org/spec/traits.html#getOverloads
The result of this trait is the function itself so it's not
hard to use, e.g the result can be passed directly to
'Parameters', '
On Tuesday, 31 May 2016 at 18:55:18 UTC, Gary Willoughby wrote:
If I have a pointer and iterate over it using a slice, like
this:
T* foo = &data;
foreach (element; foo[0 .. length])
{
...
}
Is there any overhead compared with pointer arithmeti
On Tuesday, 31 May 2016 at 20:06:47 UTC, pineapple wrote:
I'd like to find the overload of some function with the most
parameters and (in this specific case) to get their identifiers
using e.g. ParameterIdentifierTuple. There have also been cases
where I'd have liked to iterate over the result
On Tuesday, 31 May 2016 at 18:52:16 UTC, Marco Leise wrote:
The 'this' pointer is usually in some register already. On
Linux 32-bit for example it is in EAX, on Linux 64-bit is in
RDI.
The AX register seems like a bad choice, since you require the
AX/DX registers when you do multiplication a
I'd like to find the overload of some function with the most
parameters and (in this specific case) to get their identifiers
using e.g. ParameterIdentifierTuple. There have also been cases
where I'd have liked to iterate over the result of
Parameters!func for each overload of that function. Can
In relation to this thread:
http://forum.dlang.org/thread/ddckhvcxlyuvuiyaz...@forum.dlang.org
Where I asked about slicing a pointer, I have another question:
If I have a pointer and iterate over it using a slice, like this:
T* foo = &data;
foreach (element; foo[0 .. length])
On Tuesday, 31 May 2016 at 18:55:18 UTC, Gary Willoughby wrote:
Is there any overhead compared with pointer arithmetic in a for
loop?
Very very little. The slice will ensure start and stop indexes
are in bounds before the loop (and throw an RangeError if it
isn't), but inside the loop, it sho
Am Fri, 27 May 2016 10:16:48 +
schrieb Era Scarecrow :
> On Friday, 27 May 2016 at 10:14:31 UTC, Era Scarecrow wrote:
> > inc dword ptr [EAX+Foo.x.offsetof];
>
>
> So just tested it, and it didn't hang, meaning all unittests
> also passed.
>
> Final solution is:
>
>asm pure @n
Am Fri, 27 May 2016 10:06:28 +
schrieb Guillaume Piolat :
> Referencing EBP or ESP yourself is indeed dangerous. Not sure why
> the documentation would advise that. Using "this", names of
> parameters/locals/field offset is much safer.
DMD makes sure that the EBP relative access of paramete
On Tuesday, 31 May 2016 at 06:40:31 UTC, Era Scarecrow wrote:
On Tuesday, 31 May 2016 at 05:31:59 UTC, chmike wrote:
My conclusion is that rebindable is not a satisfying solution
to have mutable references to immutable objects.
I don't understand the rationale of these immutable
references. I
On Tuesday, 31 May 2016 at 08:57:51 UTC, MGW wrote:
QtE5 - is my wrapper for Qt-5
https://www.youtube.com/watch?v=DuOl-4g117E
https://github.com/MGWL/QtE5
How can we build QtE5 and/or the examples?
On Tuesday, May 31, 2016 14:11:58 ixid via Digitalmars-d-learn wrote:
> On Sunday, 29 May 2016 at 07:18:10 UTC, Jonathan M Davis wrote:
> > And the fact that allowing free functions to overload operators
> > via UFCS sends us into that territory just highlights the fact
> > that they're a horrible
On Tuesday, 31 May 2016 at 11:54:40 UTC, Timon Gehr wrote:
On 30.05.2016 18:22, Max Samukha wrote:
From the spec (https://dlang.org/spec/function.html#nested):
"Nested
functions cannot be overloaded."
Anybody knows what's the rationale?
The rationale is that nobody has implemented it in DMD
On Sunday, 29 May 2016 at 07:18:10 UTC, Jonathan M Davis wrote:
And the fact that allowing free functions to overload operators
via UFCS sends us into that territory just highlights the fact
that they're a horrible idea.
- Jonathan M Davis
Do you have any examples of UFCS doing bad things? M
On 30.05.2016 18:22, Max Samukha wrote:
From the spec (https://dlang.org/spec/function.html#nested): "Nested
functions cannot be overloaded."
Anybody knows what's the rationale?
The rationale is that nobody has implemented it in DMD.
https://issues.dlang.org/show_bug.cgi?id=12578
On Monday, 30 May 2016 at 19:06:53 UTC, ArturG wrote:
does this count?
struct Foo
{
int x;
float f;
}
void main()
{
Foo foo;
if(foo is typeof(foo).init) "A: does'nt work".writeln;
foo = Foo();
if(foo is typeof(foo).init) "B: works".writeln;
}
This one is a bug in DMD.
On Sunday, 29 May 2016 at 11:03:36 UTC, Russel Winder wrote:
GKT+ has a reputation for being dreadful on OSX and even worse
on Windows. Qt on the other hand has a reputation for being the
most portable – though clearly wx is (arguable) the most
portable.
QtE5 - is my wrapper for Qt-5
https:/
On Sunday, 29 May 2016 at 18:02:53 UTC, Steven Schveighoffer
wrote:
You can create a trusted expression by using a lambda and
immediately calling it. ag0aep6g brought it up.
I would write it like this (untested, but I think this works):
return (()@trusted => &t)().doSomething();
The key is to
18 matches
Mail list logo