Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

support c-style arrays #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
p00f wants to merge 1 commit into boostorg:develop
base: develop
Choose a base branch
Loading
from p00f:c-array
Open

support c-style arrays #189

p00f wants to merge 1 commit into boostorg:develop from p00f:c-array

Conversation

Copy link

@p00f p00f commented Oct 19, 2024

this tries to implement the solution in #170, with one change: I saw some "must be aggregate initializable" errors so I added another case depending on std::is_aggregate_v<T>

Nagisaaaaaaaaa reacted with heart emoji
Copy link
Author

p00f commented Oct 19, 2024

the tests still fail though:
test.log

Copy link

yrashk commented Oct 21, 2024

Very interested in seeing this through, let me know if I can help in any way!

Copy link
Member

the tests still fail though:

std::is_aggregate is not available in C++14, but just ignore that issue for now. Make sure that the PR builds in С++20 or C++17 mode. Any modern enough compiler is fine for that, clang-18 is fine.

Nagisaaaaaaaaa added a commit to Nagisaaaaaaaaa/ARIA that referenced this pull request Feb 6, 2025
1. Support C arrays as `MosaicPattern` members.
1.1. Use the fixed `boost::pfr` to support C arrays, see boostorg/pfr#189.
1.2. Extend the `Mosaic` system to support C arrays as `MosaicPattern` members.
1.3. Check `boost::pfr` limitations and undefined behaviors at compile time.
2. Add policy-based `Vector` which supports auto SoA.
2.1. Implemented with type reduction.
2.2. Fully test compatibility with different `Mosaic`s, including `Vec<T, size>`.
};

template <class T, std::size_t I0, std::size_t... I, class /*Enable*/ = std::enable_if_t<std::is_copy_constructible<T>::value>>
template <class T, std::size_t I0, std::size_t... I, class /*Enable*/ = std::enable_if_t<std::is_copy_constructible<T>::valueand !std::is_aggregate_v<T>>>
Copy link
Contributor

@denzor200 denzor200 Mar 6, 2025

Choose a reason for hiding this comment

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

please provide unit-test to check that boost::pfr::tuple_size for a structure with c-style array field returns real count of fields

apolukhin reacted with thumbs up emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@denzor200 denzor200 denzor200 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /