|
Boost : |
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2023-02-21 00:15:41
On 2/21/23 03:00, Peter Dimov via Boost wrote:
> 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.
In that case, maybe I should file a gcc feature request to add an
attribute preventing operator rewriting. Maybe then C++20 will be usable.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk