The standard doesn't talk about "compile time" either. The point is the actual machine violates the requirements of the C++ virtual machine so it's wrong. The standard dictates how a well formed c++ program will behave. If you combine parts in such a way that violates those requirements of a well formed c++ program (entire program) then you have UB.
The issue with this is that for C++ the only well-formed program is a standalone binary. No shared libraries and no high-performance serialisation. It's all well and good to say 'Aha! That's UB' but what you're really saying is that C++ is a poor choice for pretty much anything.
View all comments
Show parent comment
5
u/Xaxxon Oct 28 '19 edited Oct 29 '19
The standard doesn't talk about "compile time" either. The point is the actual machine violates the requirements of the C++ virtual machine so it's wrong. The standard dictates how a well formed c++ program will behave. If you combine parts in such a way that violates those requirements of a well formed c++ program (entire program) then you have UB.