Skip to content

[vtk] Avoid stdext::checked_array_iterator.#51794

Closed
Oleg2 wants to merge 1 commit into
microsoft:masterfrom
Oleg2:vtk-stdext-checked-array-iterator
Closed

[vtk] Avoid stdext::checked_array_iterator.#51794
Oleg2 wants to merge 1 commit into
microsoft:masterfrom
Oleg2:vtk-stdext-checked-array-iterator

Conversation

@Oleg2
Copy link
Copy Markdown

@Oleg2 Oleg2 commented May 15, 2026

Fixes #51766.

What this fixes

VTK's bundled (pre-7.0) copy of fmtlib at ThirdParty/diy2/vtkdiy2/include/vtkdiy2/fmt/format.h references stdext::checked_array_iterator under #ifdef _SECURE_SCL. This extension has been removed from the MSVC standard library in MSVC 14.51 (VS 2026 Preview), so the build fails with:

error C2653: 'stdext': is not a class or namespace name
error C2061: syntax error: identifier 'checked_array_iterator'

(full failure log in #51766)

Resolution

Drop the _SECURE_SCL branch and keep only the raw-pointer fallback. The patched make_checked / checked_ptr aliases become unconditional pass-throughs. This is the same approach already accepted in vcpkg for the same removal across five other ports:

PR Port
#51750 cpprestsdk
#51774 breakpad
#51749 duckdb
#51753 ampl-mp
#51785 luminoengine

Files

  • ports/vtk/diy2-fmt-remove-stdext-checked-array-iterator.patch — the source patch
  • ports/vtk/portfile.cmake — register the patch
  • ports/vtk/vcpkg.json — port-version 15 → 16
  • versions/v-/vtk.json, versions/baseline.json — version DB bump (via vcpkg x-add-version vtk)

Local verification

Built vtk[core]:x64-windows against this overlay port using MSVC 14.51.36231 (VS 2026 Preview, generator Visual Studio 18 2026). The failing vtkDIYDataExchanger.cxx translation unit now compiles cleanly.

Manifest

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download. (no source changes)
  • The "supports" clause reflects platforms that may be built. (unchanged)
  • Any fixed CI baseline entries are removed from that file. (none applicable)
  • Any patches that are no longer applied are deleted from the port's directory. (none)
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@Oleg2
Copy link
Copy Markdown
Author

Oleg2 commented May 15, 2026

Withdrawing — switching to a local-only patch in my private vcpkg checkout. The patch (ports/vtk/diy2-fmt-remove-stdext-checked-array-iterator.patch) and its construction notes remain available in the commit if anyone wants to revive it as their own PR.

@Oleg2 Oleg2 closed this May 15, 2026
@BillyONeal
Copy link
Copy Markdown
Member

Is there something wrong with it? (Why withdraw it? Would rather give you credit for the fix if it actually fixes)

To be clear I have not reviewed, I just saw linked to my other PR

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.

[VTK] build failure

2 participants