Skip to content

Make extract algorithm forward tuple. #90

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
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jehelset
Copy link
Contributor

@jehelset jehelset commented Jun 2, 2024

Use forwarding for extract, use kumi::element_t instead of std::tuple_element_t and add a test.

Didn't constrain the algo, so didn't add test for compilation failure.

, [[maybe_unused]] index_t<I0> i0
, [[maybe_unused]] index_t<I1> i1
) noexcept
{
return [&]<std::size_t... N>(std::index_sequence<N...>)
{
return kumi::tuple<std::tuple_element_t<N + I0, Tuple>...> {get<N + I0>(t)...};
return kumi::tuple<element_t<N + I0, Tuple &&>...> {get<N + I0>(KUMI_FWD(t))...};
Copy link
Owner

Choose a reason for hiding this comment

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

MSVC sometiems chokes on alias. Try typename element_t::type instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no luck!

@jehelset jehelset force-pushed the jeh/extract branch 2 times, most recently from 554ca1a to 02547be Compare November 20, 2024 14:02
Use forwarding for `extract`, use `kumi::element_t` instead of
`std::tuple_element_t` and add a test.
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.

2 participants