Repository navigation
Correctly set __cplusplus for chosen C++ standard - #264
Conversation
fb7034f to
a2f550c
Compare
|
@jefftrull Is there an open point for this PR preventing its merge? If you need more time for review, all find. Just want to clarify if there are problems with it, since I would not start with C++14, before this first step is accepted. |
|
I'm traveling (returning Monday) and don't have time to review this one thoroughly. Thanks for your patience! |
a2f550c to
9a56fe5
Compare
|
@jefftrull I rebased the PR on the latest develop HEAD. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #264 +/- ##
==========================================
Coverage ? 44.85%
==========================================
Files ? 76
Lines ? 8010
Branches ? 4080
==========================================
Hits ? 3593
Misses ? 1542
Partials ? 2875 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| if (boost::wave::need_cpp1z(ctx.get_language())) { | ||
| // define C++17 specifics | ||
| for (int i = 0; 0 != predef.static_data_cpp1z(i).name; ++i) { | ||
| predefined_macros::static_macros const& m = predef.static_data_cpp1z(i); |
There was a problem hiding this comment.
Is it really formatted like this or is this some kind of artifact...
There was a problem hiding this comment.
My bad. The #if and #endif were indented instead of being at the beginning of the lines. Now the code is formatted exactly like the code around it.
9a56fe5 to
d736482
Compare
Before this patch some language standards would set `__cplusplus` properly and some not. Now all currently available C++ language standards set `__cplusplus` correctly.
d736482 to
6f981d2
Compare
|
@jefftrull I implemented your requests. By now I also found the tests for the lexer. By editing and executing https://github.com/boostorg/wave/blob/develop/test/testlexers/test_re2c_lexer.cpp I managed to reproduce that my first version of this contribution broke something, which I fixed with my changes to On an unrelated note. I see a lot of |
|
Thanks I believe that the effort required to properly test all of the As for the support macros themselves, I have always assumed they date back to the early days of Wave when compilers were less powerful and struggled with the extensive C++03 style metaprogramming. @hkaiser can you weigh in on their purpose? Would it be OK to let this be a runtime-only choice for future standards? |
Before this patch some language standards would set
__cplusplusproperly and some not. Now all currently available C++ language standards set__cpluspluscorrectly.Related to #263
This patch is doing the obvious changes to make the existing behavior consistent and correct.
Adding a C++14 language standard and maybe even C++26 will be dedicated contributions due to them requiring a larger diff.