On Thursday, 19 August 2021 at 18:04:58 UTC, Tejas wrote:
On Thursday, 19 August 2021 at 17:43:59 UTC, Paul Backus wrote:
On Thursday, 19 August 2021 at 17:38:14 UTC, Tejas wrote:
As the topic says:
Is there an equivalent to C++'s `explicit` keyword in D?
No, because all constructors are
On Friday, 20 August 2021 at 04:27:34 UTC, Jesse Phillips wrote:
For me, this code generates the Message Box. Does this happen
for you?
no errors
https://run.dlang.io/is/4tlm3p
```D
void main() {
try {
import std.stdio: File;
File file = File(__FILE__,"r");
On Thursday, 19 August 2021 at 13:47:56 UTC, Ruby The Roobster
wrote:
On Thursday, 19 August 2021 at 03:25:31 UTC, Jesse Phillips
wrote:
tell me what went wrong. I am using DMD 2.097.2
:
```d
case WM_CREATE: //Executed on creation of the window...
try {
import core.stdc.stdio;
On Friday, 20 August 2021 at 02:51:16 UTC, jfondren wrote:
On Friday, 20 August 2021 at 02:30:53 UTC, Pablo De Nápoli
wrote:
Any idea of which could be the cause of trouble or on how to
get more specific diagnosis?
With no extra arguments I get a "compile time context created
here"
On Friday, 20 August 2021 at 02:30:53 UTC, Pablo De Nápoli wrote:
Any idea of which could be the cause of trouble or on how to
get more specific diagnosis?
With no extra arguments I get a "compile time context created
here" addendum. Does that not show up for you or does the line
not make
I am trying to write a D wrapper for libmpdec
(https://www.bytereef.org/mpdecimal/).
I get the following message (compiling with dmd with -v and
-verrros=context)
semantic2 cuenta
mpdec/decimal.d(35,20): Error: `mpd_new` cannot be
interpreted at compile time, because it has no
On Thursday, 19 August 2021 at 15:38:19 UTC, evilrat wrote:
On Thursday, 19 August 2021 at 15:12:03 UTC, Ferhat Kurtulmuş
Btw, based on
https://github.com/dlang/druntime/blob/master/src/object.d#L4209:
import core.lifetime;
import core.stdc.stdio;
import core.stdc.stdlib;
extern (C) void
On Thursday, 19 August 2021 at 15:38:19 UTC, evilrat wrote:
On Thursday, 19 August 2021 at 15:12:03 UTC, Ferhat Kurtulmuş
This is cool, but even in unit tests for malloc wrapper there
is only simple case with class without references to another
class and no dtor.
If you examine the entire
On Thursday, 19 August 2021 at 18:11:20 UTC, Paul Backus wrote:
On Thursday, 19 August 2021 at 18:04:58 UTC, Tejas wrote:
On Thursday, 19 August 2021 at 17:43:59 UTC, Paul Backus wrote:
On Thursday, 19 August 2021 at 17:38:14 UTC, Tejas wrote:
As the topic says:
Is there an equivalent to
On Thursday, 19 August 2021 at 18:04:58 UTC, Tejas wrote:
On Thursday, 19 August 2021 at 17:43:59 UTC, Paul Backus wrote:
On Thursday, 19 August 2021 at 17:38:14 UTC, Tejas wrote:
As the topic says:
Is there an equivalent to C++'s `explicit` keyword in D?
No, because all constructors are
On Thursday, 19 August 2021 at 17:43:59 UTC, Paul Backus wrote:
On Thursday, 19 August 2021 at 17:38:14 UTC, Tejas wrote:
As the topic says:
Is there an equivalent to C++'s `explicit` keyword in D?
No, because all constructors are explicit in D.
Oh... then I guess I'll have to manually
On Thursday, 19 August 2021 at 17:38:14 UTC, Tejas wrote:
As the topic says:
Is there an equivalent to C++'s `explicit` keyword in D?
No, because all constructors are explicit in D.
As the topic says:
Is there an equivalent to C++'s `explicit` keyword in D?
On Thursday, 19 August 2021 at 09:39:26 UTC, evilrat wrote:
On Thursday, 19 August 2021 at 08:25:23 UTC, Bienlein wrote:
Oops, I just realized that you can also not call emplace when
@nogc is present. Well that is at least consistent with not
either being able to call destroy ;-).
So, I
On Thursday, 19 August 2021 at 15:12:03 UTC, Ferhat Kurtulmuş
wrote:
On Thursday, 19 August 2021 at 07:30:38 UTC, Bienlein wrote:
Hello,
I allocate some instance of class C manually and then free the
memory again:
[...]
I just wanted to leave this here.
On Thursday, 19 August 2021 at 07:30:38 UTC, Bienlein wrote:
Hello,
I allocate some instance of class C manually and then free the
memory again:
[...]
I just wanted to leave this here.
https://github.com/AuburnSounds/Dplug/blob/master/core/dplug/core/nogc.d
On Thursday, 19 August 2021 at 03:25:31 UTC, Jesse Phillips wrote:
tell me what went wrong. I am using DMD 2.097.2
This is an error message you'll get from Windows if the file is
locked (open by another application).
Odd. This works if I use a console application. It also works if
I use C
This works, vit. Thanks! I thought it wouldn't, because your code
still makes use of embrace. But it somehow worked, although I
don't understand why ... ;-).
I also added a constructor using the same approach as your
destructor and this also worked:
this(int otherNum) @nogc {
On Thursday, 19 August 2021 at 08:25:23 UTC, Bienlein wrote:
Oops, I just realized that you can also not call emplace when
@nogc is present. Well that is at least consistent with not
either being able to call destroy ;-).
So, I guess this means that you can forget about manually
allocating
On Thursday, 19 August 2021 at 08:25:23 UTC, Bienlein wrote:
On Thursday, 19 August 2021 at 07:30:38 UTC, Bienlein wrote:
Hello,
I allocate some instance of class C manually and then free the
memory again:
class C {
int num;
~this() {
writeln("~this");
}
On Thursday, 19 August 2021 at 07:30:38 UTC, Bienlein wrote:
Hello,
I allocate some instance of class C manually and then free the
memory again:
class C {
int num;
~this() {
writeln("~this");
}
}
void foo() // @nogc
{
auto mem =
Hello,
I allocate some instance of class C manually and then free the
memory again:
class C {
int num;
~this() {
writeln("~this");
}
}
void foo() // @nogc
{
auto mem = cast(C)malloc(__traits(classInstanceSize, C));
auto c =
22 matches
Mail list logo