Ok, I know this sounds like a broken question, but let me explain before the downvotes start: we are using C++11 as a baseline for our development (targeting several platforms). Recently a few changes needed to be done in our codebase and suddenly the need for some C++17 features crawled in.
All is fine till now, on our developer platform all compiles nicely, but on one of the continuous integration platforms (Ubuntu 18.04) we have got some errors, like:
/usr/include/ev++.h:355:46: error: ISO C++1z does not allow dynamic exception specifications dynamic_loop (unsigned int flags = AUTO) throw (bad_loop)
(c++1z dynamic exception specification error gives a good explanation why this happens and also offers some hacks on how to make it disappear)
But I started thinking (theoretically only, of course) that would it be possible that we specify some portions of a source file to be compiled with code conforming to C++11 and other parts with code conforming to C++17?
(And just to clarify: No, we don't want to upgrade, and yes, we have solved the problem, again, I am just interested in a theoretical approach)
Aucun commentaire:
Enregistrer un commentaire