3 ms·
Our codebase works on all three, we compile on MSVC for Windows, GCC for Linux, and Clang for Mac. It isn't easy and honestly the idea of "just don't use MSVC
by Guvante 3y ago
Our codebase works on all three, we compile on MSVC for Windows, GCC for Linux, and Clang for Mac.
It isn't easy and honestly the idea of "just don't use MSVC for a while" is strange to me. Sure you can compile with any of them but almost certainly you are going to stick to one for a given use case.
"This release is on a different compiler" isn't something you do because of a bug. Instead your roll back a version or avoid using the unsupported feature until a fix is released.
The reason is as much as they are supposed to do the same thing the reality is bugs are bugs, e.g. if you invoke undefined behavior you will generally get consistent results with a given compiler but all bets are off if you swap. Similarly it is hard not to rely on implementation defined behavior without building your own standard library which specifically defines that behavior across compilers.