Yes the understanding is correct. I simplified the code a little:
IMPORTANT: DMD 2.065 is used.
class Car{
void delegate() onEvent;
}
class Test{
this() shared
{
auto car = new shared Car();
assert( typeid( car.onEvent ).toString() == "shared(void
dele
On Monday, 16 June 2014 at 15:25:51 UTC, Ali Çehreli wrote:
Here is a minimal example that reproduces the issue and the
hint that compiles the code:
class SocketListener
{
public void delegate( shared(SocketListener) sender )
/* shared */// <-- UNCOMMENT TO COMPILE
eventWhenSt
Add "import std.algorithm". Splitter is defined there.
http://dlang.org/phobos/std_algorithm.html#splitter
On Monday, 16 June 2014 at 16:38:15 UTC, Sanios wrote:
Hello guys, as first I don't know, if I'm writing to correct
section, but I've got a problem. I'm actually reading book of D
guide and
Thanks Ali. That has solved the problem. Actually I tried to use
that `shared` as follows before:
public shared void delegate( shared(BasicSocketListener) sender )
eventWhenStarted;
Though it didn't work with that. When it is put "before" the
attribute name, it works now. It is just confusin
In a class I defined an event attribute as follows:
public void delegate( shared(SocketListener) sender )
eventWhenStarted;
---
An instance of SocketListener is created.
auto listener = new shared SocketListener();
---
I defined a shared method that will be called when the event
occurs.
On Friday, 16 May 2014 at 04:59:46 UTC, Taylor Hillegeist wrote:
The subject says it all really. i have this example:
import core.memory;
class fruit{
int value=5;
public int getvalue(){
return value;
}
}
int main(string[] args) {
GC.disable;
static fruit myfruit;
return
On Thursday, 1 May 2014 at 11:38:50 UTC, Nordlöw wrote:
Have anybody put together some D code for reading out tables
from ELF files?
A range/slice based version would be nice.
I don't know this though, in the morning Ubuntu has showed
updates. One of them was "libelf" which says in its descr
On Sunday, 20 April 2014 at 22:44:28 UTC, Bauss wrote:
I know the socket has the nonblocking settings, but how would I
actually go around using it in D? Is there a specific procedure
for it to work correctly etc.
I've taken a look at splat.d but it seems to be very outdated,
so that's why I