
A complete rebuild like
doesn't need such hacks. It has a formal empty state for those users who won't risk the cost of a virtual function call. It might not be necessary, but wouldn't it be a worthwhile optimization regardless?
As I mentioned, it has a formal empty state. No further optimisation is needed. It is as efficient as is possible.
Even in the generic case it would work without any cross-module analysis and should generally make the compiler's task easier. It would also make the checks for failure or success constexpr (not sure if that is typically relevant). Or would it imply problematic tradeoffs?
Unlike with