On Wednesday, 13 November 2013 at 11:25:58 UTC, bearophile wrote:
Gary Willoughby:
On Wednesday, 13 November 2013 at 11:03:48 UTC, bearophile
wrote:
Associative arrays don't have a dup.
According to this they do: http://dlang.org/hash-map.html
Right, sorry, I have added a note to the bug r
Gary Willoughby:
On Wednesday, 13 November 2013 at 11:03:48 UTC, bearophile
wrote:
Associative arrays don't have a dup.
According to this they do: http://dlang.org/hash-map.html
Right, sorry, I have added a note to the bug report.
Bye,
bearophile
On Wednesday, 13 November 2013 at 11:12:55 UTC, Gary Willoughby
wrote:
On Wednesday, 13 November 2013 at 11:03:48 UTC, bearophile
wrote:
Associative arrays don't have a dup.
According to this they do: http://dlang.org/hash-map.html
And adding parens works fine. `hashmap.dup()`.
On Wednesday, 13 November 2013 at 11:03:48 UTC, bearophile wrote:
Associative arrays don't have a dup.
According to this they do: http://dlang.org/hash-map.html
Gary Willoughby:
int[string] a;
auto b = a.sizeof;
auto c = a.length;
auto d = a.dup;
auto e = a.keys;
auto f = a.values;
a.rehash;
}
Compile with: rdmd -property test.d
Out
import std.stdio;
void main(string[] args)
{
int[string] a;
auto b = a.sizeof;
auto c = a.length;
auto d = a.dup;
auto e = a.keys;
auto f = a.values;
a.rehash;