Skip to content

Commit

Permalink
[FIX] Correctly propagate the constness of the inner range type.
Browse files Browse the repository at this point in the history
Instead of using the value type of the underlying range we use the reference type, such that in case the original range is passed in as const it is correctly propagated to the inner range type.
Otherwise, we might end in the situation that we want to assign a const iterator to a non-const iterator which is not allowed.
  • Loading branch information
rrahn committed Jul 4, 2024
1 parent f879faf commit e7a373b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/seqan3/utility/simd/views/to_simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class view_to_simd : public std::ranges::view_interface<view_to_simd<urng_t, sim
/*!\name Auxiliary types
* \{
*/
using inner_range_type = std::ranges::range_value_t<urng_t>; //!< The inner range type.
using inner_range_type = std::ranges::range_reference_t<urng_t>; //!< The inner range type.
using chunk_type = std::array<simd_t, simd_traits<simd_t>::length>; //!< The underlying type to hold the chunks.
using scalar_type = typename simd_traits<simd_t>::scalar_type; //!< The scalar type.
//!\brief The SIMD type with maximal number of lanes for the current arch.
Expand Down

0 comments on commit e7a373b

Please sign in to comment.