Skip to content

Conversation

@p00f
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>

@p00f
Copy link
Author

p00f commented Oct 19, 2024

the tests still fail though:
test.log

@yrashk
Copy link

yrashk commented Oct 21, 2024

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

@apolukhin
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>::value and !std::is_aggregate_v<T>>>
Copy link
Contributor

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

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.

4 participants