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

[FIX] relax seqan3::views::to_simd requirements to be C++20 compatible #2849

Merged
merged 1 commit into from Oct 15, 2021

Conversation

marehr
Copy link
Member

@marehr marehr commented Oct 6, 2021

Part of seqan/product_backlog#403

/seqan3/test/unit/utility/simd/views/to_simd_test.cpp:349:48:   required from ‘void view_to_simd_test_issue_1813_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = std::tuple<std::deque<seqan3::dna4, std::allocator<seqan3::dna4> >, __vector(1) signed char>]’
/seqan3/test/unit/utility/simd/views/to_simd_test.cpp:326:1:   required from here
/seqan3/include/seqan3/utility/simd/views/to_simd.hpp:67:24: error: static assertion failed: Expects the inner range to be default constructible.
   67 |     static_assert(std::default_initializable<std::ranges::range_value_t<urng_t>>,
      |                   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/seqan3/include/seqan3/utility/simd/views/to_simd.hpp:67:24: note: ‘default_initializable<std::ranges::take_view<std::ranges::ref_view<std::deque<seqan3::dna4, std::allocator<seqan3::dna4> > > > >’ evaluates to false
/seqan3/include/seqan3/utility/simd/views/to_simd.hpp:67:24: note: constraints not satisfied
In file included from /opt/gcc/gcc-git/include/c++/12.0.0/compare:39,
                 from /opt/gcc/gcc-git/include/c++/12.0.0/bits/stl_pair.h:65,
                 from /opt/gcc/gcc-git/include/c++/12.0.0/bits/stl_algobase.h:64,
                 from /opt/gcc/gcc-git/include/c++/12.0.0/memory:63,
                 from /seqan3-build/gcc-git-debug-std20/_deps/gtest_fetch_content-src/googletest/include/gtest/gtest.h:57,
                 from /seqan3/test/unit/utility/simd/views/to_simd_test.cpp:8:
/opt/gcc/gcc-git/include/c++/12.0.0/concepts:138:13:   required for the satisfaction of ‘constructible_from<_Tp>’ [with _Tp = std::ranges::take_view<std::ranges::ref_view<std::deque<seqan3::dna4, std::allocator<seqan3::dna4> > > >]
/opt/gcc/gcc-git/include/c++/12.0.0/concepts:139:30: note: the expression ‘is_constructible_v<_Tp, _Args ...> [with _Tp = std::ranges::take_view<std::ranges::ref_view<std::deque<seqan3::dna4, std::allocator<seqan3::dna4> > > >; _Args = {}]’ evaluated to ‘false’
  139 |       = destructible<_Tp> && is_constructible_v<_Tp, _Args...>;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```
/seqan3/test/unit/utility/simd/views/to_simd_test.cpp:349:48:   required from ‘void view_to_simd_test_issue_1813_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = std::tuple<std::deque<seqan3::dna4, std::allocator<seqan3::dna4> >, __vector(1) signed char>]’
/seqan3/test/unit/utility/simd/views/to_simd_test.cpp:326:1:   required from here
/seqan3/include/seqan3/utility/simd/views/to_simd.hpp:67:24: error: static assertion failed: Expects the inner range to be default constructible.
   67 |     static_assert(std::default_initializable<std::ranges::range_value_t<urng_t>>,
      |                   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/seqan3/include/seqan3/utility/simd/views/to_simd.hpp:67:24: note: ‘default_initializable<std::ranges::take_view<std::ranges::ref_view<std::deque<seqan3::dna4, std::allocator<seqan3::dna4> > > > >’ evaluates to false
/seqan3/include/seqan3/utility/simd/views/to_simd.hpp:67:24: note: constraints not satisfied
In file included from /opt/gcc/gcc-git/include/c++/12.0.0/compare:39,
                 from /opt/gcc/gcc-git/include/c++/12.0.0/bits/stl_pair.h:65,
                 from /opt/gcc/gcc-git/include/c++/12.0.0/bits/stl_algobase.h:64,
                 from /opt/gcc/gcc-git/include/c++/12.0.0/memory:63,
                 from /seqan3-build/gcc-git-debug-std20/_deps/gtest_fetch_content-src/googletest/include/gtest/gtest.h:57,
                 from /seqan3/test/unit/utility/simd/views/to_simd_test.cpp:8:
/opt/gcc/gcc-git/include/c++/12.0.0/concepts:138:13:   required for the satisfaction of ‘constructible_from<_Tp>’ [with _Tp = std::ranges::take_view<std::ranges::ref_view<std::deque<seqan3::dna4, std::allocator<seqan3::dna4> > > >]
/opt/gcc/gcc-git/include/c++/12.0.0/concepts:139:30: note: the expression ‘is_constructible_v<_Tp, _Args ...> [with _Tp = std::ranges::take_view<std::ranges::ref_view<std::deque<seqan3::dna4, std::allocator<seqan3::dna4> > > >; _Args = {}]’ evaluated to ‘false’
  139 |       = destructible<_Tp> && is_constructible_v<_Tp, _Args...>;
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
@marehr marehr requested review from a team and remyschwab and removed request for a team October 6, 2021 16:15
@vercel
Copy link

vercel bot commented Oct 6, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/seqan/seqan3/BBvzHdtEmBkFGduXP8GpmxmBzKa2
✅ Preview: https://seqan3-git-fork-marehr-gcc-12-3-seqan.vercel.app

@codecov
Copy link

codecov bot commented Oct 6, 2021

Codecov Report

Merging #2849 (9accf83) into master (dcbba96) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2849   +/-   ##
=======================================
  Coverage   98.37%   98.37%           
=======================================
  Files         277      277           
  Lines       10963    10963           
=======================================
  Hits        10785    10785           
  Misses        178      178           
Impacted Files Coverage Δ
include/seqan3/utility/simd/views/to_simd.hpp 91.52% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dcbba96...9accf83. Read the comment docs.

@marehr
Copy link
Member Author

marehr commented Oct 12, 2021

@remyschwab If you need help to understand this, we can meet up :)

@eseiler eseiler requested review from a team and smehringer and removed request for a team October 14, 2021 13:31
@smehringer smehringer merged commit 01b2d73 into seqan:master Oct 15, 2021
@marehr marehr deleted the gcc-12-3 branch October 15, 2021 10:01
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.

None yet

3 participants