4 ms·
How does this work in C++ with operator overloading. Are they still the same? That would make for some interesting obfuscated code.
by kevincox 6y ago
How does this work in C++ with operator overloading. Are they still the same? That would make for some interesting obfuscated code.
- jcelerier 6y ago> How does this work in C++ with operator overloading. you can't overload int::operator[](...)
- Koshkin 6y agoI guess the question was whether the subscript operator is always assumed commutative in C++.
- edflsafoiewq 6y agoNo, they're not. It works by: if either a or b in a[b] is a class/enumeration type, call a.operator[](b).