Fix MSVC build error from std::array::begin() passed as raw pointer - #2900
Open
ManasBagul23 wants to merge 1 commit into
Open
ManasBagul23 wants to merge 1 commit into
ManasBagul23 wants to merge 1 commit into
Conversation
addDoubleArrayOption expects a su2double*, but std::array::begin() returns a checked iterator type under the MSVC STL instead of decaying to a pointer as it effectively does with libstdc++. This broke native Windows builds with MSVC. Use .data() instead, which returns a raw pointer on every implementation.
There was a problem hiding this comment.
🟢 Approval recommended
The focused portability fix has no unresolved review comments.
Pull request overview
Fixes an MSVC build error by passing raw pointers from std::array to configuration option APIs.
Changes:
- Replaced
.begin()with.data()forFLAME_INITandSPARK_INIT. - Preserved behavior while ensuring portable MSVC compatibility.
File summaries
| File | Description |
|---|---|
Common/src/CConfig.cpp |
Uses portable raw-pointer access for flamelet options. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
addDoubleArrayOption expects a su2double*, but std::array::begin() returns a checked iterator type under the MSVC STL instead of decaying to a pointer as it effectively does with libstdc++. This broke native Windows builds with MSVC. Use .data() instead, which returns a raw pointer on every implementation.
Proposed Changes
Give a brief overview of your contribution here in a few sentences.
Related Work
Resolve any issues (bug fix or feature request), note any related PRs, or mention interactions with the work of others, if any.
PR Checklist
Put an X by all that apply. You can fill this out after submitting the PR. If you have any questions, don't hesitate to ask! We want to help. These are a guide for you to know what the reviewers will be looking for in your contribution.
pre-commit run --allto format old commits.