Clean up expression implementations - #589
Conversation
They aren't universally supported by all expression subclasses. Therefore, them being defined in the general Expr API doesn't make too much sense. It's better to be notified of a missing operator via a compiler error than via a runtime exception.
This avoids situations in which important functions are not implemented for a given expression type (as was the case with NormalOperatorSequence). Thus, this gives a compiler-enforced guarantee that these functions will not just remain at the (useless) base implementations that just throw.
ReviewWARNING this Claude-generated, reviewed by me; some accompanying fixes are in #590 Reviewed the full diff (18 files) against The risky mechanical rewrites all check out:
Findings below. The 1.
|
Since C++11 std::swap will use move semantics so this custom swap impl doesn't get us any benefit.
See individual commits for what changed