Skip to content

Fix missing braces in visit_as_struct.h - #707

Merged
pawelrutkaq merged 1 commit into
eclipse-score:mainfrom
etas-contrib:fix/visit-as-struct-missing-braces
Oct 20, 2026
Merged

pawelrutkaq merged 1 commit into
eclipse-score:mainfrom
etas-contrib:fix/visit-as-struct-missing-braces

Conversation

@cameron-craig-etas

Copy link
Copy Markdown
Contributor

Fixes #706

When building score/lifecycle with --features=all_wall_warnings, we see an error in baselibs:

visit_as_struct.h:132:33: error: missing braces around initializer for 'const char* [1]' [-Werror=missing-braces]
132 | return {std::get(tup)...};

We're fixing this by adding the missing braces. Without the extra braces we're relying on brace elision.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The single-line initializer fix addresses the reported warning without changing conversion behavior.

No open issues 🎉

What changed in this PR

Fixes #706 by explicitly bracing the underlying std::array initializer in the reflection visitor.

Changes:

  • Adds nested braces to eliminate -Wmissing-braces without changing behavior.
File Description
score/​static_reflection_with_serialization/​visitor/​include/​visitor/​visit_as_struct.h Removes brace elision in tuple-to-array conversion.

Review effort: Balanced

@github-project-automation github-project-automation Bot moved this from In Progress to On Hold in BAS - Baselibs FT Oct 19, 2026
@pawelrutkaq
pawelrutkaq enabled auto-merge October 19, 2026 13:43
auto-merge was automatically disabled October 19, 2026 14:10

Head branch was pushed to by a user without write access

@cameron-craig-etas
cameron-craig-etas force-pushed the fix/visit-as-struct-missing-braces branch from d8054e5 to 862d16b Compare October 19, 2026 14:10
@cameron-craig-etas
cameron-craig-etas deployed to workflow-approval October 19, 2026 14:10 — with GitHub Actions Active
@cameron-craig-etas
cameron-craig-etas deployed to workflow-approval October 19, 2026 14:10 — with GitHub Actions Active
@cameron-craig-etas
cameron-craig-etas deployed to workflow-approval October 19, 2026 14:10 — with GitHub Actions Active
@cameron-craig-etas
cameron-craig-etas deployed to workflow-approval October 19, 2026 14:10 — with GitHub Actions Active
@cameron-craig-etas
cameron-craig-etas deployed to workflow-approval October 19, 2026 14:10 — with GitHub Actions Active
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview for this pull request is available at:
pr-707: https://eclipse-score.github.io/baselibs/pr-707/

@pawelrutkaq
pawelrutkaq added this pull request to the merge queue Oct 20, 2026
Merged via the queue into eclipse-score:main with commit 2c64f1f Oct 20, 2026
29 checks passed
@github-project-automation github-project-automation Bot moved this from On Hold to Done in BAS - Baselibs FT Oct 20, 2026

This branch was successfully deployed

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

Labels

c++ C++ code comp-static_reflection_with_serialization Related to score/static_reflection_with_serialization

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Fix compiler warning when building with --features=all_wall_warnings

3 participants