For large projects, it's extremely common to compile using so-called unity or blob builds. Multiple .CPP files are compiled into one. Build systems like Fasbuild or engines like Unreal are typically able to automate this for you. This have the side-effect of leaking #include statements into other .CPP files within the same blob, and makes using namespaces more awkward - but otherwise, it works, and the speed benefits are very important.
It seems to me that a project using unity builds would be unable to use your file-based versioning since the versioning would leak into other.cpp files. I think you might want to introduce scope-based versioning, or versioning closing tags, for compatibility.
For large projects, it's extremely common to compile using so-called unity or blob builds. Multiple .CPP files are compiled into one. Build systems like Fasbuild or engines like Unreal are typically able to automate this for you. This have the side-effect of leaking #include statements into other .CPP files within the same blob, and makes using namespaces more awkward - but otherwise, it works, and the speed benefits are very important.
It seems to me that a project using unity builds would be unable to use your file-based versioning since the versioning would leak into other.cpp files. I think you might want to introduce scope-based versioning, or versioning closing tags, for compatibility.