BUILD: Require C++17 in VALID_CXX_STANDARDS#1048
Merged
Merged
Conversation
VXL 7 defaults CMAKE_CXX_STANDARD to 17 and uses C++17-only constructs (inline constexpr variables, structured bindings), but VALID_CXX_STANDARDS still accepted 11 and 14. An explicit CMAKE_CXX_STANDARD=11 would pass the validity check and then fail to compile. Drop 11/14 so an unsupported standard is rejected up front with a clear message.
hjmjohnson
added a commit
to dzenanz/ITK
that referenced
this pull request
Jun 8, 2026
Drop 11/14 from VALID_CXX_STANDARDS so an explicit CMAKE_CXX_STANDARD=11/14 is rejected at configure time. Addresses greptile comment r3374378710.
hjmjohnson
added a commit
to dzenanz/ITK
that referenced
this pull request
Jun 8, 2026
Drop 11/14 from VALID_CXX_STANDARDS so an explicit CMAKE_CXX_STANDARD=11/14 is rejected at configure time. Addresses greptile comment r3374378710.
Contributor
Author
|
@dzenanz related to greptile warnings identified in ITK |
dzenanz
approved these changes
Jun 8, 2026
2 tasks
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.
Drop
"11"and"14"fromVALID_CXX_STANDARDSso that VXL 7's C++17 minimum is actually enforced.VXL 7 defaults
CMAKE_CXX_STANDARDto17and uses C++17-only constructs (inline constexprvariables, structured bindings), but the validity list still accepted11/14. A build configured with an explicit-DCMAKE_CXX_STANDARD=11passed the check and then failed to compile. With this change such a configuration is rejected up front with a clear message.Validation
CMAKE_CXX_STANDARD=17): succeeds.-DCMAKE_CXX_STANDARD=11: now fails at configure time withCMAKE_CXX_STANDARD:STRING=11 is not a supported C++ standard; VXL requires one of: 17;20;23.