BioC++ core-0.7.0
The Modern C++ libraries for Bioinformatics.
 
Loading...
Searching...
No Matches
misc.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2022 deCODE Genetics
3// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
4// Copyright (c) 2016-2020, Knut Reinert & MPI für molekulare Genetik
5// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
6// shipped with this file and also available at: https://github.com/biocpp/biocpp-core/blob/main/LICENSE.md
7// -----------------------------------------------------------------------------------------------------
8
14#pragma once
15
16#include <ranges>
17
18#include <bio/core.hpp>
19
20namespace bio::ranges::detail
21{
22
28template <std::ranges::input_range rng_t>
29constexpr void consume(rng_t && rng)
30{
31 auto it = begin(rng);
32 auto it_end = end(rng);
33 while (it != it_end)
34 ++it;
35}
36
41template <std::ranges::forward_range rng_t>
42constexpr void consume(rng_t &&)
43{}
44
45} // namespace bio::ranges::detail
T begin(T... args)
Provides platform and dependency checks.
T end(T... args)