All the stages that mongostream supports should use the new SerializationOptions.serializeForCloning param and should not need to override DocumentSource::clone(). Such an assert will help ensure that a future code change does not break the SerializationOptions.serializeForCloning support that we rely on.
Stack Overflow says something like this should work to add this assert
if constexpr (!std::is_same_v<decltype(&Derived::foo), decltype(&Base::foo)>) { std::cout << "overrided" << std::endl; }