Skip to content

Commit

Permalink
[FIX] Use std::ranges:: instead of ranges:: (#3005)
Browse files Browse the repository at this point in the history
* [FIX] Use std::ranges:: instead of ranges::

* [MISC] clang-format

Co-authored-by: seqan-actions[bot] <seqan-actions@users.noreply.github.com>
  • Loading branch information
eseiler and seqan-actions committed Jun 7, 2022
1 parent 0ac4aa2 commit 3034678
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion doc/tutorial/07_sequence_file/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ If no 10 records are available any more, it will just print the remaining record

On some occasions, you are only interested in sequence records that fulfill a certain criteria,
e.g. having a minimum sequence length or a minimum average quality.
Just like in the example with *ranges::view::chunk* you can use *std::ranges::filter* for this purpose:
Just like in the example with *seqan3::views::chunk* you can use *std::ranges::filter* for this purpose:

\snippet doc/tutorial/07_sequence_file/sequence_file_quality_filter.cpp main

Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/alignment/pairwise/edit_distance_unbanded.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,8 @@ class edit_distance_unbanded :
query{std::forward<query_t>(_query)},
config{std::forward<align_config_t>(_config)},
_score{static_cast<score_type>(std::ranges::size(query))},
database_it{ranges::begin(database)},
database_it_end{ranges::end(database)}
database_it{std::ranges::begin(database)},
database_it_end{std::ranges::end(database)}
{
static constexpr size_t alphabet_size_ = alphabet_size<query_alphabet_type>;

Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/alphabet/range/hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace std
* \details
* \experimentalapi{Experimental since version 3.1.}
*/
template <ranges::input_range urng_t>
template <std::ranges::input_range urng_t>
requires seqan3::semialphabet<std::ranges::range_reference_t<urng_t>>
struct hash<urng_t>
{
Expand All @@ -38,7 +38,7 @@ struct hash<urng_t>
* \details
* \experimentalapi{Experimental since version 3.1.}
*/
template <ranges::input_range urng2_t>
template <std::ranges::input_range urng2_t>
requires seqan3::semialphabet<std::ranges::range_reference_t<urng2_t>>
size_t operator()(urng2_t && range) const noexcept
{
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/core/detail/persist_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace seqan3::detail
*
* \details
*
* Note that most members of this class are generated by ranges::view_interface which is not yet documented here.
* Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
*/
template <std::ranges::input_range urng_t>
class view_persist : public std::ranges::view_interface<view_persist<urng_t>>
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/io/sam_file/format_sam.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ inline void format_sam::read_sam_dict_vector(seqan3::detail::sam_tag_variant & v
value_type value)
{
std::vector<value_type> tmp_vector;
while (std::ranges::begin(stream_view) != ranges::end(stream_view)) // not fully consumed yet
while (std::ranges::begin(stream_view) != std::ranges::end(stream_view)) // not fully consumed yet
{
read_arithmetic_field(stream_view | detail::take_until(is_char<','>), value);
tmp_vector.push_back(value);
Expand Down Expand Up @@ -988,7 +988,7 @@ inline void format_sam::read_sam_byte_vector(seqan3::detail::sam_tag_variant & v
std::vector<std::byte> tmp_vector;
std::byte value;

while (std::ranges::begin(stream_view) != ranges::end(stream_view)) // not fully consumed yet
while (std::ranges::begin(stream_view) != std::ranges::end(stream_view)) // not fully consumed yet
{
try
{
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/io/sequence_file/format_embl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ class format_embl
}
else
{
if (ranges::empty(id)) //[[unlikely]]
if (std::ranges::empty(id)) //[[unlikely]]
throw std::runtime_error{"The ID field may not be empty when writing embl files."};

if (options.embl_genbank_complete_header)
Expand Down
4 changes: 2 additions & 2 deletions include/seqan3/io/sequence_file/format_genbank.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,14 @@ class format_genbank
size_t sequence_size{0};
[[maybe_unused]] char buffer[50];
if constexpr (!detail::decays_to_ignore_v<seq_type>)
sequence_size = ranges::size(sequence);
sequence_size = std::ranges::size(sequence);

// ID
if constexpr (detail::decays_to_ignore_v<id_type>)
{
throw std::logic_error{"The ID field may not be set to ignore when writing genbank files."};
}
else if (ranges::empty(id)) //[[unlikely]]
else if (std::ranges::empty(id)) //[[unlikely]]
{
throw std::runtime_error{"The ID field may not be empty when writing genbank files."};
}
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/io/views/detail/take_exactly_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace seqan3::detail
*
* \details
*
* Note that most members of this class are generated by ranges::view_interface which is not yet documented here.
* Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
*/
template <std::ranges::view urng_t, bool or_throw>
class view_take_exactly : public std::ranges::view_interface<view_take_exactly<urng_t, or_throw>>
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/io/views/detail/take_until_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace seqan3::detail
*
* \details
*
* Note that most members of this class are generated by ranges::view_interface which is not yet documented here.
* Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
*/
template <std::ranges::view urng_t, typename fun_t, bool or_throw, bool and_consume>
class view_take_until : public std::ranges::view_interface<view_take_until<urng_t, fun_t, or_throw, and_consume>>
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/search/views/kmer_hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ namespace seqan3::detail
*
* \details
*
* Note that most members of this class are generated by ranges::view_interface which is not yet documented here.
* Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
*/
template <std::ranges::view urng_t>
class kmer_hash_view : public std::ranges::view_interface<kmer_hash_view<urng_t>>
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/search/views/minimiser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class minimiser_view : public std::ranges::view_interface<minimiser_view<urng1_t
*/
template <typename other_urng1_t>
requires (std::ranges::viewable_range<other_urng1_t>
&& std::constructible_from<urng1_t, ranges::ref_view<std::remove_reference_t<other_urng1_t>>>)
&& std::constructible_from<urng1_t, std::ranges::ref_view<std::remove_reference_t<other_urng1_t>>>)
minimiser_view(other_urng1_t && urange1, size_t const window_size) :
urange1{std::views::all(std::forward<other_urng1_t>(urange1))},
urange2{default_urng2_t{}},
Expand Down
14 changes: 7 additions & 7 deletions include/seqan3/utility/views/interleave.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace seqan3::detail
*
* \details
*
* Note that most members of this class are generated by ranges::view_interface which is not yet documented here.
* Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
*/
template <std::ranges::random_access_range urng_t, std::ranges::random_access_range inserted_rng_t>
requires std::ranges::view<urng_t> && std::ranges::sized_range<urng_t> && std::ranges::view<inserted_rng_t>
Expand All @@ -65,13 +65,13 @@ class view_interleave : public std::ranges::view_interface<view_interleave<urng_
//!\brief This resolves to range_type::size_type as the underlying range is guaranteed to be sized.
using size_type = std::ranges::range_size_t<urng_t>;
//!\brief The reference_type.
using reference = ranges::common_reference_t<std::ranges::range_reference_t<urng_t>,
std::ranges::range_reference_t<inserted_rng_t>>;
using reference =
std::common_reference_t<std::ranges::range_reference_t<urng_t>, std::ranges::range_reference_t<inserted_rng_t>>;
//!\brief The const_reference type is equal to the reference type.
using const_reference = detail::transformation_trait_or_t<
ranges::common_reference<std::ranges::range_reference_t<urng_t const>,
std::ranges::range_reference_t<inserted_rng_t const>>,
void>;
using const_reference =
detail::transformation_trait_or_t<std::common_reference<std::ranges::range_reference_t<urng_t const>,
std::ranges::range_reference_t<inserted_rng_t const>>,
void>;
//!\brief The value_type (which equals the reference_type with any references removed).
using value_type = std::ranges::range_value_t<urng_t>;
//!\brief A signed integer type, usually std::ptrdiff_t.
Expand Down
2 changes: 1 addition & 1 deletion include/seqan3/utility/views/repeat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace seqan3::detail
* This class models an infinite range over a given value, although "infinity" is limited by the maximum value of
* `difference_type` of which the iterator stores a member variable to represent distances.
*
* Note that most members of this class are generated by ranges::view_interface which is not yet documented here.
* Note that most members of this class are generated by std::ranges::view_interface which is not yet documented here.
*/
template <std::copy_constructible value_t>
class repeat_view : public std::ranges::view_interface<repeat_view<value_t>>
Expand Down

1 comment on commit 3034678

@vercel
Copy link

@vercel vercel bot commented on 3034678 Jun 7, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

seqan3 – ./

seqan3.vercel.app
seqan3-git-master-seqan.vercel.app
seqan3-seqan.vercel.app

Please sign in to comment.