Skip to content

Add operator[] to enumerable_thread_specific #608

Open
@akukanov

Description

Since enumerable_thread_specific accepts random access iteration according to https://oneapi-spec.uxlfoundation.org/specifications/oneapi/v1.4-rev-1/elements/onetbb/source/thread_local_storage/enumerable_thread_specific_cls/iteration, it could be useful to add operator[] directly to the class, in case someone prefers access by an index.

It should probably be said that indexes have no permanent association with threads and thread-specific values, and that the indexes outside of the [0,size()) range are invalid. The method at() can be added as well for an out-of-range exception on invalid access.

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions