Compare this D code:
import std.stdio;
struct Foo
{
~this()
{
writeln("Destroying foo");
}
}
void main()
{
Foo[string] foos;
foos["bar"] = Foo();
writeln("Preparing to destroy");
foos.remove("bar");
writeln("Ending program");
}
and equivalent C++ code:
On Saturday, 2 March 2019 at 11:32:53 UTC, JN wrote:
...
Is this proper behavior? I'd imagine that when doing
foos.remove("bar"), Foo goes out of scope and should be
immediately cleaned up rather than at the end of the scope? Or
am I misunderstanding how should RAII work?
https://dlang.org/s
On Saturday, March 2, 2019 4:32:53 AM MST JN via Digitalmars-d-learn wrote:
> Compare this D code:
>
> import std.stdio;
>
> struct Foo
> {
> ~this()
> {
> writeln("Destroying foo");
> }
> }
>
> void main()
> {
> Foo[string] foos;
>
> foos["bar"] = Foo();
> wr
Hi, trying to compile some stuff on Windows and get a bunch of
undefined symbol errors, but these look as some standard modules are
missing.
See full output at: https://pastebin.com/e9xLrQAF
Any idea how this can happen? Or how to fix this?
--
Robert M. Münch
http://www.saphirion.com
smarter
Ok, seems to be related to an older installed DMD 2.079.0, updating to
2.085.0 fixed the problem. Robert
On 2019-03-02 21:15:05 +, Robert M. Münch said:
Hi, trying to compile some stuff on Windows and get a bunch of
undefined symbol errors, but these look as some standard modules are
miss
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld:
cannot find -lphobos2-ldc-shared
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld:
cannot find -ldruntime-ldc-shared
On Sunday, 3 March 2019 at 01:47:50 UTC, Domain wrote:
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld:
cannot find -lphobos2-ldc-shared
/data/data/com.termux/files/usr/bin/aarch64-linux-android-ld:
cannot find -ldruntime-ldc-shared
Any dub config example?
~> dub build
Dynamic lib