Skip to content
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

Enable borrowed range for iota_simd view #93

Closed
rrahn opened this issue May 25, 2020 · 0 comments · Fixed by seqan/seqan3#2065
Closed

Enable borrowed range for iota_simd view #93

rrahn opened this issue May 25, 2020 · 0 comments · Fixed by seqan/seqan3#2065
Assignees

Comments

@rrahn
Copy link
Contributor

rrahn commented May 25, 2020

Currently, the iota_simd view is not a borrowed range because it depends on the ranges library to support the borrowed range concept which was adopted later for the C++20 standard.

Add this to the end of include/seqan3/core/simd/view_iota_simd.hpp

//!\cond
// Enable borrowed range.
namespace std::ranges
{
template <typename index_t>
inline constexpr bool enable_borrowed_range<seqan3::detail::iota_simd_view<index_t>> = true;
} // namespace std::ranges
//!\endcond

And add this to the test in: test/unit/core/simd/view_iota_simd_test.cpp
to the concept checks test

EXPECT_TRUE(std::ranges::borrowed_range<iota_simd_view_t>);
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 a pull request may close this issue.

1 participant