jbcoe / jbcoe/cc-protocol

Generalize operator implementation

Open
#252 2 comments 0 reactions 0 assignees View on GitHub
Important
Dominant language
C++
Stars
11
Forks
4
Avg merge
16h 39m
Merged PRs (30d)
131

Description

There are a few cases to consider for operators:

- Unary operators
- Binary operators
- Operators that are both unary AND binary
- Variadic operators (`operator()` and `operator[]`)
- Special cases: `operator->`, `operator++`/`operator--` (postfix)

The `call_operator` implementation should be generalized to support `operator[]` as well, since they function very similarly.

Contributor guide

Open the contributing guide

Research direction

Start by reading the call_operator implementation and the existing operator-handling code. Trace how unary, binary, unary-and-binary, variadic, arrow, and postfix increment/decrement operators are represented, then compare that with operator[] handling. Done means call_operator is generalized to support operator[] and the listed operator forms without separate incompatible cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.