On Friday, 10 May 2019 at 17:54:44 UTC, H. S. Teoh wrote:
Perhaps try Dustmite on it?
AFAIK, calling new on a struct should never return null. So
there must be something else not quite right here. But without
actual code it's anybody's guess as to what it might be.
The last time I heard som
On Friday, 10 May 2019 at 12:19:29 UTC, Cym13 wrote:
On Friday, 10 May 2019 at 10:11:51 UTC, faissaloo wrote:
My program contains the following statement:
auto newChildNode = new Node();
In debugging I have found that this pointer evaluates to null,
what could cause this? I should have ple
My program contains the following statement:
auto newChildNode = new Node();
In debugging I have found that this pointer evaluates to null,
what could cause this? I should have plenty of memory, my only
other idea is some sort of heap corruption.
On Monday, 6 May 2019 at 15:17:37 UTC, aliak wrote:
Do you have an example of a referenced object turning to null?
We may be able to spot something
Unfortunately I haven't managed to produce an example any smaller
than my entire codebase
I've been having some memory issues (referenced objects turning
to nulls for no apparent reason) and I was wondering if I've
misunderstood how allocation works when instantiating a struct
that uses alias this:
import std.stdio;
struct Parent {
int a;
On Friday, 3 May 2019 at 17:51:39 UTC, Adam D. Ruppe wrote:
On Friday, 3 May 2019 at 17:48:50 UTC, faissaloo wrote:
How can I get a mixin to implicitly include the symbols from
its surrounding context? Is this possible?
What's your big picture goal? Do you have sample code you have
tried so f
How can I get a mixin to implicitly include the symbols from its
surrounding context? Is this possible?
I'm trying to use:
```
__traits(getOverloads, fn)
```
But I get the error
expected 2 arguments for getOverloads but had 1
Is there an alternative I can use?
Thanks alot everyone for your replies, this makes sense now.
I have the following function
static Component* constructComponent(int value) {
return (new ComponentChild(value));
}
ComponentChild is a derived class of Component.
However, I get told that ComponentChild cannot be converted to
Component*. I'm confused here, doe
In Python -1%3 == 2 however in D -1%3 == -1
Is there a standard library function or something that gives me
the Python version of modulo?
On Saturday, 19 January 2019 at 20:07:34 UTC, Rubn wrote:
On Saturday, 19 January 2019 at 17:49:31 UTC, faissaloo wrote:
[...]
If you look at the implementation, "lines" is a struct.
https://github.com/dlang/phobos/blob/v2.084.0/std/stdio.d#L4330
[...]
Ah that makes some sense, thanks for
This seems to work fine
file = File("test.txt", "r");
with (file)
{
scope(exit) close();
foreach (string line; file.lines())
{
line_array ~= line;
}
}
however:
file = File("test.txt", "r");
with (file)
{
scope(exit) close();
On Monday, 3 December 2018 at 20:37:22 UTC, Jonathan M Davis
wrote:
On Monday, December 3, 2018 1:07:24 PM MST Goksan via
Digitalmars-d-learn wrote:
Are there any differences between these 2 methods of copying
elements?
double[] array = [ 1, 20, 2, 30, 7, 11 ];
// Non dup
double[6] bracket_sy
14 matches
Mail list logo