SeqAn3 3.1.0
The Modern C++ library for sequence analysis.
transfer_type_modifier_onto.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
16
18
19namespace seqan3::detail
20{
21
33template <typename source_t, typename target_t>
34struct transfer_type_modifier_onto
35{
36private:
39 std::is_const_v<std::remove_reference_t<target_t>>,
42
44 using maybe_rvalue_reference_t = std::conditional_t<std::is_rvalue_reference_v<source_t> ||
45 std::is_rvalue_reference_v<target_t>,
47 maybe_const_target_t>;
48
50 using maybe_lvalue_reference_target_t = std::conditional_t<std::is_lvalue_reference_v<source_t> ||
51 std::is_lvalue_reference_v<target_t>,
53 maybe_rvalue_reference_t>;
54public:
55
57 using type = maybe_lvalue_reference_target_t;
58};
59
67template <typename source_t, typename target_t>
68using transfer_type_modifier_onto_t = typename transfer_type_modifier_onto<source_t, target_t>::type;
69
70} // namespace seqan3::detail
Provides platform and dependency checks.
The <type_traits> header from C++20's standard library.