Date: Fri, 4 Oct 2024 10:58:15 +0200
(This is not a proposal, but might be a core issue)
[over.oper#general-note-3] says
[Note 3 : The identities among certain predefined operators applied to
basic types (for example, ++a ≡ a+=1) need not hold for operator functions.
Some predefined operators, such as +=, require an operand to be an lvalue
when applied to basic types; this is not required by operator functions. —
end note]
The term "basic type" is never defined in the standard, and not used
anywhere else either. Should we change this to something else, like
"arithmetic types"? Or is "basic type" just used informally here, assuming
the reader understands this to be more of a vague concept?
It seems like it has been this way since at least C++11, so it might not be
a big problem.
Cheers,
Anders
[over.oper#general-note-3] says
[Note 3 : The identities among certain predefined operators applied to
basic types (for example, ++a ≡ a+=1) need not hold for operator functions.
Some predefined operators, such as +=, require an operand to be an lvalue
when applied to basic types; this is not required by operator functions. —
end note]
The term "basic type" is never defined in the standard, and not used
anywhere else either. Should we change this to something else, like
"arithmetic types"? Or is "basic type" just used informally here, assuming
the reader understands this to be more of a vague concept?
It seems like it has been this way since at least C++11, so it might not be
a big problem.
Cheers,
Anders
Received on 2024-10-04 08:58:29