Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch makes necessary changes to the relevant source files to make it possible to build kernel at C++ 17 level. This will allow us to take advantage of new features available in C++ 17 standard.
The following changes are part of this PR:
remove obsolete
register
keyword (mostly underbsd/
part of the tree)add
const
specifier to the comparison operator definitions where necessaryreplace deprecated
std::iterator
usage with explicit definitions of traits (for exampleiterator_category
,value_type
, and 3 others) (for some background info read this - https://www.fluentcpp.com/2018/05/08/std-iterator-deprecated/)add
constexpr
to thefriend
declaration of std::distance<mbuf_iterator>make tests, httpserver-api, and some other modules compilable with non-C++ 11 level
Please note, that all the unit tests and modules implemented in C++ are not subject to this change. On that note, the unit tests are passing.
An example of how to build with C++ 17:
Finally, this PR does not change the default C++ level which remains at 11, until we permanently decide to change in the future.