On Saturday, 10 September 2022 at 16:33:03 UTC, Erdem Demir wrote:
I wish I could use ref DListOfA returnVal = but we can't
in D.
Can you please suggest alternatives?
I think you should try advanced update. Your flexibility and what
you can do are limited by your dreams. A couple
On Sunday, 11 September 2022 at 16:26:10 UTC, Ali Çehreli wrote:
On 9/11/22 02:54, Injeckt wrote:
> [...]
You can combine your class object with other arguments and your
thread function will know how to unwrap your class object to
call its member function:
[...]
Thank you for help,
On 9/11/22 09:26, Ali Çehreli wrote:
// This combines a class instance (which is a pointer behind the scene)
// Combine with the class object
In both places I meant "class variable".
Ali
On 9/11/22 02:54, Injeckt wrote:
> And what I should do to pass non-static function?
You can combine your class object with other arguments and your thread
function will know how to unwrap your class object to call its member
function:
import std.stdio;
// I am not on Windows, so I am
On Sunday, 11 September 2022 at 09:47:34 UTC, solidstate1991
wrote:
Here's this code:
This should be allowed, but also the way you're supposed to write
it now is a no-argument opIndex.
On Sunday, 11 September 2022 at 09:29:23 UTC, Mike Parker wrote:
On Sunday, 11 September 2022 at 09:15:11 UTC, Mike Parker wrote:
Pointers to non-static member functions always produce a
delegate. Otherwise, you wouldn't be able to access the class
instance's members.
Reference:
Here's this code:
```d
auto opSlice()
{
struct Range
{
Attr currentAttr;
auto front() { return currentAttr; }
void popFront() { currentAttr = currentAttr._nextAttr; }
bool empty() { return currentAttr is null; }
}
return Range(firstAttr);
}
```
On Sunday, 11 September 2022 at 09:15:11 UTC, Mike Parker wrote:
Pointers to non-static member functions always produce a
delegate. Otherwise, you wouldn't be able to access the class
instance's members.
Reference:
https://dlang.org/spec/function.html#closures
On Sunday, 11 September 2022 at 09:02:31 UTC, Injeckt wrote:
I have a one class and two modificators, where in "public"
function I'm calling CreateThread with address of the
ClientThread function which stored in same class, but in
"private" modificator.
And i get this error:
Error: cannot
I have a one class and two modificators, where in "public"
function I'm calling CreateThread with address of the
ClientThread function which stored in same class, but in
"private" modificator.
And i get this error:
Error: cannot pass argument `` of type `extern
(Windows) uint delegate(void*
10 matches
Mail list logo