SeqAn3 3.4.0-rc.1
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
transfer_type_modifier_onto.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2024 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2024 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
10#pragma once
11
12#include <type_traits>
13
15
16namespace seqan3::detail
17{
18
30template <typename source_t, typename target_t>
31struct transfer_type_modifier_onto
32{
33private:
36 || std::is_const_v<std::remove_reference_t<target_t>>,
39
41 using maybe_rvalue_reference_t =
42 std::conditional_t<std::is_rvalue_reference_v<source_t> || std::is_rvalue_reference_v<target_t>,
44 maybe_const_target_t>;
45
47 using maybe_lvalue_reference_target_t =
48 std::conditional_t<std::is_lvalue_reference_v<source_t> || std::is_lvalue_reference_v<target_t>,
50 maybe_rvalue_reference_t>;
51
52public:
54 using type = maybe_lvalue_reference_target_t;
55};
56
64template <typename source_t, typename target_t>
65using transfer_type_modifier_onto_t = typename transfer_type_modifier_onto<source_t, target_t>::type;
66
67} // namespace seqan3::detail
Provides platform and dependency checks.
Hide me