Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Add byKeyValue() overload for AA pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
9rnsr committed Jul 17, 2015
1 parent 6321a2b commit d8c7cec
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/object.d
Expand Up @@ -1865,7 +1865,7 @@ auto byValue(T : Value[Key], Value, Key)(T *aa) pure nothrow @nogc
return (*aa).byValue();
}

auto byKeyValue(T : Value[Key], Value, Key)(T aa) pure nothrow @nogc @property
auto byKeyValue(T : Value[Key], Value, Key)(T aa) pure nothrow @nogc
{
static struct Result
{
Expand Down Expand Up @@ -1895,6 +1895,11 @@ auto byKeyValue(T : Value[Key], Value, Key)(T aa) pure nothrow @nogc @property
return Result(_aaRange(cast(void*)aa));
}

auto byKeyValue(T : Value[Key], Value, Key)(T* aa) pure nothrow @nogc
{
return (*aa).byKeyValue();
}

Key[] keys(T : Value[Key], Value, Key)(T aa) @property
{
auto a = cast(void[])_aaKeys(cast(inout(void)*)aa, Key.sizeof, typeid(Key[]));
Expand Down

0 comments on commit d8c7cec

Please sign in to comment.