SeqAn3
3.0.1
The Modern C++ library for sequence analysis.
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
as_const.hpp
Go to the documentation of this file.
1
// -----------------------------------------------------------------------------------------------------
2
// Copyright (c) 2006-2020, Knut Reinert & Freie Universität Berlin
3
// Copyright (c) 2016-2020, 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 <
seqan3/core/type_traits/function.hpp
>
16
#include <
seqan3/std/ranges
>
17
18
namespace
seqan3::detail
19
{
20
22
struct
as_const_fn
23
{
25
template
<
typename
t>
26
t operator()(t
const
&& arg)
const
27
{
28
return
std::move
(arg);
29
}
30
32
template
<
typename
t>
33
t
const
& operator()(t
const
& arg)
const
34
{
35
return
arg;
36
}
37
};
38
39
}
// namespace seqan3::detail
40
41
namespace
seqan3::views
42
{
43
87
inline
auto
const
as_const
=
std::views::transform
(seqan3::detail::as_const_fn{});
89
90
}
// namespace seqan3::views
function.hpp
Provides various type traits for use on functions.
seqan3::views
The SeqAn namespace for views.
Definition:
view_to_simd.hpp:672
seqan3::views::move
const auto move
A view that turns lvalue-references into rvalue-references.
Definition:
move.hpp:68
ranges
Adaptations of concepts from the Ranges TS.
seqan3::pack_traits::transform
seqan3::type_list< trait_t< pack_t >... > transform
Apply a transformation trait to every type in the pack and return a seqan3::type_list of the results.
Definition:
traits.hpp:307
seqan3::views::as_const
const auto as_const
A view that provides only const & to elements of the underlying range.
Definition:
as_const.hpp:87
Version:
main_user
main_dev
3.4.0
3.3.0
3.2.0
3.1.0
3.0.3
3.0.2
3.0.1
3.0.0
seqan3
range
views
as_const.hpp
Generated on Tue Feb 18 2020 09:33:20 for SeqAn3 by
1.8.16