Skip to content

BUILD: Require C++17 in VALID_CXX_STANDARDS#1048

Merged
hjmjohnson merged 1 commit into
vxl:masterfrom
hjmjohnson:require-cxx17-valid-standards
Jun 8, 2026
Merged

BUILD: Require C++17 in VALID_CXX_STANDARDS#1048
hjmjohnson merged 1 commit into
vxl:masterfrom
hjmjohnson:require-cxx17-valid-standards

Conversation

@hjmjohnson

Copy link
Copy Markdown
Contributor

Drop "11" and "14" from VALID_CXX_STANDARDS so that VXL 7's C++17 minimum is actually enforced.

VXL 7 defaults CMAKE_CXX_STANDARD to 17 and uses C++17-only constructs (inline constexpr variables, structured bindings), but the validity list still accepted 11/14. A build configured with an explicit -DCMAKE_CXX_STANDARD=11 passed the check and then failed to compile. With this change such a configuration is rejected up front with a clear message.

Validation
  • Default configure (CMAKE_CXX_STANDARD=17): succeeds.
  • -DCMAKE_CXX_STANDARD=11: now fails at configure time with
    CMAKE_CXX_STANDARD:STRING=11 is not a supported C++ standard; VXL requires one of: 17;20;23.

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.
@hjmjohnson hjmjohnson marked this pull request as ready for review June 8, 2026 19:44
@hjmjohnson

Copy link
Copy Markdown
Contributor Author

@dzenanz related to greptile warnings identified in ITK

@hjmjohnson hjmjohnson merged commit 607f2a7 into vxl:master Jun 8, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants