hasIndexing

Check if T can be indexed by an instance of I.

enum hasIndexing (
T
I = size_t
)

Examples

static assert(!hasIndexing!(int));
static assert(hasIndexing!(int[3]));
static assert(hasIndexing!(byte[]));
static assert(hasIndexing!(byte[], uint));
static assert(hasIndexing!(string));

See Also

http://forum.dlang.org/post/ajxtksnsxqmeulsedmae@forum.dlang.org

TODO: move to traits_ex.d TODO: Move to Phobos

Meta