I have 2 files
file abc.d:
==
module my.abc;
class Abc
{
private int x;
this() { this.x = 1; }
}
==
and xyz.d:
==
module my.xyz;
import my.abc;
class Xyz: Abc
{
this() { super(); this.x = 2; }
}
==
Compilation fails with "Deprecation: my.abc.Abc.x is not visible
from module xyz"
On Monday, 19 December 2016 at 10:14:49 UTC, Ali wrote:
On Monday, 19 December 2016 at 06:42:27 UTC, Nikhil Jacob wrote:
[...]
What're you trying to do here?
Forward declarations in C++ are used to solve a few different
things:
1. Reduce build times (unneeded in D AFAIK)
2. Break cyclic
On Monday, 19 December 2016 at 06:21:10 UTC, ketmar wrote:
i bet that just trying this with D compiler will take less time
than writing forum post.
I did try but it seems to give compilation failure... Let me try
once more and I will get back with more details.
In C, we can define a struct without body in an include file and
use pointer to that structure
For examples in public header file.
struct data;
data* new_data();
We can then define the elements of struct data privately inside
the implementation of library.
Can we do this in D without
On Tuesday, 13 December 2016 at 05:10:02 UTC, Nicholas Wilson
wrote:
On Tuesday, 13 December 2016 at 04:48:11 UTC, Nikhil Jacob
wrote:
In the D spec for pure functions it says that a pure function
can override
"can override an impure function, but an impure function
cannot override a pure
In the D spec for pure functions it says that a pure function can
override
"can override an impure function, but an impure function cannot
override a pure one"
Can anyone help me how to do this ?
On Monday, 12 December 2016 at 12:30:42 UTC, Jacob Carlborg wrote:
On 2016-12-12 12:15, Nicholas Wilson wrote:
there is the pure function attribute, how ever this still
allows you to
use globals *if you pass them as parameters to the function*.
And it can access immutable global data.
On Monday, 12 December 2016 at 11:15:28 UTC, Nicholas Wilson
wrote:
On Monday, 12 December 2016 at 11:02:21 UTC, Nikhil Jacob wrote:
Is there any way to check whether a function/delegate passed
to a function uses any shared or global variables ?
I could not find any in std.traits.
there is
Is there any way to check whether a function/delegate passed to a
function uses any shared or global variables ?
I could not find any in std.traits.
On Thursday, 21 April 2016 at 17:33:32 UTC, ag0aep6g wrote:
On 21.04.2016 19:10, jacob wrote:
I was going to suggest either sending a `shared(TS*)` or
receiving a `shared(T)*`. But it looks like you can't send a
shared pointer. When I tried, it got turned into a
unshared-pointer-to-shared on
Hello!
I try to send shared pointer to struct:
[code]
import std.stdio;
import std.concurrency;
shared struct S(T, uint M)
{
T[M] x;
}
shared struct M
{
int x;
}
private void runner(T)()
{
shared(T*) s = receiveOnly!(shared(T*))();
writeln(s.x.length);
I try to implement chunk (something like lock-free fixedsize
queue)
--
import core.atomic;
shared struct Chunk(T, uint N)
{
shared T[N] data;
shared uint count;
shared uint queueCounter;
@property uint capacity() { return N; }
@property uint count() {
On Wednesday, 23 September 2015 at 04:34:45 UTC, Rikki Cattermole
wrote:
On 23/09/15 8:20 AM, Jacob wrote:
How do I setup mono-D for creating shared libraries and
including them
into other projects? When I drag the .d files to create the
library
from, which is not my own, I get undefined
How do I setup mono-D for creating shared libraries and including
them into other projects? When I drag the .d files to create the
library from, which is not my own, I get undefined references. I
have the lib files, which are a bunch of separate libs, that I
want to include into one big lib.
14 matches
Mail list logo