SeqAn3 3.1.0
The Modern C++ library for sequence analysis.
pop_front.hpp
Go to the documentation of this file.
1// -----------------------------------------------------------------------------------------------------
2// Copyright (c) 2006-2021, Knut Reinert & Freie Universität Berlin
3// Copyright (c) 2016-2021, Knut Reinert & MPI für molekulare Genetik
4// This file may be used, modified and/or redistributed under the terms of the 3-clause BSD-License
5// shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md
6// -----------------------------------------------------------------------------------------------------
7
13#pragma once
14
15#include <utility>
16
18
19namespace seqan3
20{
41template <tuple_like tuple_t>
42constexpr auto tuple_pop_front(tuple_t && t)
43{
44 static_assert(std::tuple_size_v<std::remove_cvref_t<tuple_t>> > 0);
45
46 return std::get<1>(tuple_split<1>(std::forward<tuple_t>(t)));
47}
48
49} // namespace seqan3
constexpr auto tuple_pop_front(tuple_t &&t)
Removes the first element of a tuple.
Definition: pop_front.hpp:42
The main SeqAn3 namespace.
Definition: cigar_operation_table.hpp:2
Provides seqan3::tuple_split.