Repository navigation
Enable setting language standard C++14 - #275
Conversation
This does not change the preprocessing logic. C++14 did not add or change language features relevant for preprocessing. However, we require an explicit C++14 mode so we can set `__cplusplus` correctly during preprocessing of C++14 projects.
- literal suffixes for `size_t` are a C++23 feature - The `module` keyword is a C++20 feature
745bd74 to
e4a63e4
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #275 +/- ##
==========================================
Coverage ? 33.90%
==========================================
Files ? 76
Lines ? 7391
Branches ? 4105
==========================================
Hits ? 2506
Misses ? 2369
Partials ? 2516 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Let's leave the macros alone for now, I think it's outside the scope of this work (beyond introducing |
|
Thanks for this contribution! I see you caught a missing test for the Can I ask for the flag in |
Was tested beforehand with C++17 due to no C++14 mode existing.
Should I create an issue as reminder for this topic? I definitely would not touch the macros in this PR. I just had no other place to share my thoughts and offer looking into it (if desired).
Done |
Changing those macros is simultaneously very tedious and of low value IMO and if you are excited to work on Wave I would recommend you do something more fun :) Have you had a look at our issues? Also I'm interested in some cleanups, like:
although those may be larger projects |
I will try to work on some issues beyond C++ versions support, since my project depends on I have no strong opinion here. I am also fine not doing this. It was merely an offer. To me editing/maintaining the code seems needlessly tedious due to the macro pattern. That much said, it "only" gets worse every 3 years 😅 |
You've captured my feelings perfectly. If you have a proposal for making this easier and feel motivated to work on it I have no objection. Still hoping @hkaiser can chime in on the original motivation and whether it still applies, in his opinion. |
Related to #263
This does not change the preprocessing logic. C++14 did not add or changelanguage features relevant for preprocessing. However, we require an explicit C++14 mode so we can set
__cpluspluscorrectly during preprocessing of C++14 projects.As agreed on in #264 we are from now on using the concrete names
need_cpp14()andBOOST_WAVE_SUPPORT_CPP14instead of cpp1y.I did think again about all the
BOOST_WAVE_SUPPORT_CPP*macros. There was the idea of not using macros anymore for new standards. Besides this missing final confirmation, this does imho not apply to C++14, which is sandwiched in between standards already using the macro pattern.A note on
BOOST_WAVE_SUPPORT_CPP*beyond what this PR does.Imho we can't drop the macro pattern from new standards like C++26. Adding C++26 guarded only behind the language setting interface means one can no longer opt out supporting / compiling newer languages standards by manipulating
BOOST_WAVE_SUPPORT_CPP*. In other words, adding C++26 without the macros would break the pattern created by the language macros. To my understanding getting rid of the language level macros is only feasible in a sane and consistent matter by starting with the oldest language standards. Meaning, first removingBOOST_WAVE_SUPPORT_CPP0X, thenBOOST_WAVE_SUPPORT_CPP14, thenBOOST_WAVE_SUPPORT_CPP1Zand so on. At least from a logical and consistency point of view.I would be willing to have a look at such a cleanup. I believe it is either a lot of trivial changes and done without taking too much time, or one finds fastish places not working with only the language selection interface as input and this is a result too.
That much said, I would not do anything until there is a clear agreement:
BOOST_WAVE_SUPPORT_CPP*macros from users with the argumentation the programmatic language feature selection is to be used.