diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8ed7498..d851484 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] + os: [ubuntu-latest, windows-latest, macOS-13] dc: [dmd-latest, ldc-latest] arch: [x86_64] tests: [unittests] diff --git a/source/vibe/container/hashmap.d b/source/vibe/container/hashmap.d index 64d337f..a8b85cb 100644 --- a/source/vibe/container/hashmap.d +++ b/source/vibe/container/hashmap.d @@ -257,15 +257,15 @@ struct HashMap(TKey, TValue, Traits = DefaultHashMapTraits!TKey, Allocator = IAl return 0; } - auto byKey() { return bySlot.map!(e => e.key); } - auto byKey() const { return bySlot.map!(e => e.key); } - auto byValue() { return bySlot.map!(e => e.value); } - auto byValue() const { return bySlot.map!(e => e.value); } - auto byKeyValue() { import std.typecons : Tuple; return bySlot.map!(e => Tuple!(Key, "key", Value, "value")(e.key, e.value)); } - auto byKeyValue() const { import std.typecons : Tuple; return bySlot.map!(e => Tuple!(const(Key), "key", const(Value), "value")(e.key, e.value)); } - - private auto bySlot() { return m_table[].filter!(e => !Traits.equals(e.key, Traits.clearValue)); } - private auto bySlot() const { return m_table[].filter!(e => !Traits.equals(e.key, Traits.clearValue)); } + auto byKey() { return bySlot.map!((ref e) => e.key); } + auto byKey() const { return bySlot.map!((ref e) => e.key); } + auto byValue() { return bySlot.map!(ref(ref e) => e.value); } + auto byValue() const { return bySlot.map!(ref(ref e) => e.value); } + auto byKeyValue() { import std.typecons : Tuple; return bySlot.map!((ref e) => Tuple!(Key, "key", Value, "value")(e.key, e.value)); } + auto byKeyValue() const { import std.typecons : Tuple; return bySlot.map!((ref e) => Tuple!(const(Key), "key", const(Value), "value")(e.key, e.value)); } + + private auto bySlot() { return m_table[].filter!((ref e) => !Traits.equals(e.key, Traits.clearValue)); } + private auto bySlot() const { return m_table[].filter!((ref e) => !Traits.equals(e.key, Traits.clearValue)); } private @property AllocatorInstanceType allocator() {