-
Notifications
You must be signed in to change notification settings - Fork 2
Composite value class #11
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
After adding the Number class, initialisation and general access needs to be updated and the tests modified.
By wrapping in a lambda the type can be changed in the future in a single place.
As we use the value immediately, call the function as the argument.
I'm running 16.0.6 locally, but the github runner is 14.0.0 and giving compiler errors. ``` In file included from /home/runner/work/nuclear-data-reader/nuclear-data-reader/src/ame_data.cpp:1: In file included from /home/runner/work/nuclear-data-reader/nuclear-data-reader/include/nuclear-data-reader/ame_data.hpp:15: In file included from /home/runner/work/nuclear-data-reader/nuclear-data-reader/include/nuclear-data-reader/converter.hpp:22: /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: error: call to consteval function 'std::chrono::hh_mm_ss::_S_fractional_width' is not a constant expression static constexpr unsigned fractional_width = {_S_fractional_width()}; ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2320:48: note: undefined function '_S_fractional_width' cannot be used in a constant expression /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/chrono:2275:2: note: declared here _S_fractional_width() ^ 1 error generated. ``` Try using the latest version of clang available to jammy.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #11 +/- ##
=======================================
Coverage 99.07% 99.08%
=======================================
Files 14 15 +1
Lines 971 979 +8
=======================================
+ Hits 962 970 +8
Misses 9 9
|
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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.
Wrap a measured value in a class so we can keep the value and error/uncertainty together.
Use std::optional so we can be 'modern' and not have to use magic numbers to signify error states.