It is interesting that C++ decided to disallow it in compile time evaluation ( constexpr contexts ).
I have already seen fixes where code that used pointer arithmetic to go from one struct member to another generated garbage in real-world gamedev projects. That code had been like that for 20+ years and worked fine, then suddenly broke after toolchain update.
It is interesting that C++ decided to disallow it in compile time evaluation ( constexpr contexts ).
I have already seen fixes where code that used pointer arithmetic to go from one struct member to another generated garbage in real-world gamedev projects. That code had been like that for 20+ years and worked fine, then suddenly broke after toolchain update.