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 have been:
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>Please note all the unit tests and modules implemented in C++ are not subject to this change at this point. On that note, the unit tests seem to be passing.
TODO: Fix compilation errors in
core/callstack.cc
. The kernel does not seem to depend on it as I temporarily disabled it in makefile. The only place that uses it ismodules/java-mgmt/jni/tracepoint.cc
. I could not figure out how to fix the compilation errors.