Do all C++ operators return something?

No, not all operators return something.

Although they are probably not exactly what you are thinking about, note that the delete and delete[] C++ ‘keywords’ are actually operators; and they are defined as having the void return type – which means they evaluate to nothing (which is not ‘something’).

From cppreference:

void operator delete  ( void* ptr ) noexcept;
void operator delete[]( void* ptr ) noexcept;

Leave a Comment