IndexedBy

Wrapper for R with Type-Safe I-Indexing.

  1. struct IndexedBy(R, I)
    struct IndexedBy (
    R
    I
    ) if (
    isIndexableBy!(R, I)
    ) {}
  2. struct IndexedBy(R, string IndexTypeName)

Alias This

_r

Members

Aliases

Index
alias Index = I
Undocumented in source.

Mixins

__anonymous
mixin _genIndexAndSliceOps!I
Undocumented in source.

Variables

_r
R _r;
Undocumented in source.

Mixed In Members

From mixin _genIndexAndSliceOps!I

at
auto ref at()

Get element at compile-time index i.

opIndex
auto ref opIndex(I i)

Get element at index i.

opIndexAssign
auto ref opIndexAssign(V value, I i)

Set element at index i to value.

opSlice
auto ref opSlice(I i, I j)
Undocumented in source. Be warned that the author may not have intended to support it.
opSliceAssign
auto ref opSliceAssign(V value, I i, I j)
Undocumented in source. Be warned that the author may not have intended to support it.

See Also

http://forum.dlang.org/thread/gayfjaslyairnzrygbvh@forum.dlang.org#post-gayfjaslyairnzrygbvh:40forum.dlang.org

TODO: Merge with https://github.com/rcorre/enumap

TODO: Use std.range.indexed when I is an enum with non-contigious enumerators. Perhaps use among aswell.

TODO: Rename to something more concise such as Bby.

TODO: Allow I to be a string and if so derive Index to be that string.

Meta