Skip to content

Workaround for MSVC#4842

Merged
ax3l merged 4 commits intoAMReX-Codes:developmentfrom
WeiqunZhang:msvc_26
Dec 12, 2025
Merged

Workaround for MSVC#4842
ax3l merged 4 commits intoAMReX-Codes:developmentfrom
WeiqunZhang:msvc_26

Conversation

@WeiqunZhang
Copy link
Copy Markdown
Member

This is needed for MSVC, because it does not seem to handle using MLLinOpT<MF>::setLevelBC correctly.

Additional background: BLAST-WarpX/warpx#6406

@ax3l ax3l self-assigned this Dec 12, 2025
Copy link
Copy Markdown
Member

@ax3l ax3l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for digging into this!

I just reminded myself: the issue is that MSVC does a somehow no-standard/weird two-phase name lookup when dealing with C++ templates, which delays almost all template validation until instantiation...

There might be flag for modern MSVC, /permissive- or so, that makes it standard compliant. I think it would be possible for all our toolchains and deployments if we would require this for our code, but the devil is always in the detail, especially when it comes to working with third party include headers, too. We would have to test.
https://learn.microsoft.com/en-us/cpp/overview/visual-cpp-language-conformance?view=msvc-170
https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170

@ax3l ax3l merged commit 4fc753d into AMReX-Codes:development Dec 12, 2025
73 checks passed
@WeiqunZhang WeiqunZhang deleted the msvc_26 branch December 12, 2025 18:52
@ax3l
Copy link
Copy Markdown
Member

ax3l commented Dec 12, 2025

I saw googling somewhere that template standard compliance might be automatic in MSVC once we switch to C++20 #4840. To be seen :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants