21 Feb
2023
21 Feb
'23
midnight
Andrey Semashev wrote:
Isn't the result of "==" always boolean?
The result can have any type. However, the rewritten candidates for operator== are only generated when the result is bool, so expression templates should be unaffected by this operator rewriting.
That would have made too much sense. Have faith in the committee. Instead, it's an error if a rewritten candidate doesn't return bool.