chore: raise npsim baseline to C++20 and modernize C++17-era target/code usage#51
Open
Copilot wants to merge 2 commits into
Open
chore: raise npsim baseline to C++20 and modernize C++17-era target/code usage#51Copilot wants to merge 2 commits into
Copilot wants to merge 2 commits into
Conversation
Agent-Logs-Url: https://github.com/eic/npsim/sessions/68636d02-5e79-4914-8be0-cf3b097f7513 Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
wdconinc
May 17, 2026 17:21
View session
wdconinc
approved these changes
May 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Updates npsim’s build configuration and a small GeoCad code path to assume a C++20 baseline, removing remaining C++17 requirements and using C++20 container APIs where helpful.
Changes:
- Set project-wide default C++ standard to 20 and restrict allowed overrides to 20 or 23.
- Update per-target CMake
cxx_std_*requirements from 17 → 20 in tools and GeoCad. - Simplify
TOCCToStep::GetLabelOfVolumeusingstd::map::contains()+at().
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
CMakeLists.txt |
Raises project default C++ standard to 20 and tightens accepted standard overrides. |
src/tools/CMakeLists.txt |
Updates tool executables’ target compile features to require C++20. |
src/geocad/CMakeLists.txt |
Updates GeoCad library target compile features to require C++20. |
src/geocad/src/TOCCToStep.cxx |
Uses C++20 contains()/at() for map lookup and avoids operator[]. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Capybara summary for PR 51
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in 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.
This updates the project to use C++20 as the minimum/default language level and removes remaining C++17 target requirements. It also applies a focused code-path simplification enabled by C++20 container APIs.
Build standard policy
20in top-level CMake.17|20|23to20|23.Target-level CMake requirements
cxx_std_17withcxx_std_20in:src/geocad/CMakeLists.txtsrc/tools/CMakeLists.txtC++20 simplification in code
TOCCToStep::GetLabelOfVolumeusingcontains()+at()instead offind()/end()+ indexed access.operator[].