Skip to content

Implement const operator[] in IArrayMemory interface #89

@konard

Description

@konard

Location: cpp/Platform.Memory/IArrayMemory.h:9

Current code:

//virtual TElement& operator[](std::size_t index) {}

// TODO: impl const
//virtual const TElement& operator[](std::size_t index) const {}

Issue:
The IArrayMemory interface is missing the implementation of the const version of operator[]. Currently both the regular and const versions are commented out.

Suggestion:
Implement both versions of the operator[] to provide proper const-correctness in the interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions