linksplatform / linksplatform/Memory

Implement const operator[] in IArrayMemory interface

Open Beginner friendly
#89 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1
Forks
1
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open cpp/Platform.Memory/IArrayMemory.h at line 9 and inspect the commented operator[] declarations and nearby interface context. Confirm the regular and const overloads are declared with const-correct return and access behavior, then verify that the interface exposes both forms without breaking its existing usages.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Feature
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.