Questions tagged [operator-overloading]

Use for questions about operator overloading, a language feature that allows operators to have programmer-specified meanings.

Filter by
Sorted by
Tagged with
6 votes
2 answers
166 views

How to determine the meaning of a polymorphic operator?

Some operators have multiple meanings. For example: - represents the prefix negative, or it can represent the infix ...
Aster's user avatar
  • 2,688
9 votes
1 answer
166 views

How to distinguish custom operators from each other?

How might one go about building a parser that can distinguish custom operators in prefix, infix or postfix positions. For example: ...
kaiserthe13th's user avatar
14 votes
11 answers
864 views

What alternatives are there for C++ operator overloading syntax?

I noticed C++ has operator overloading syntax with just the operator names: T& operator +(T& lhs, T& rhs) { return /* ... */; } However, there are ...
user16217248's user avatar
  • 7,535