SeqAn3 3.4.0
The Modern C++ library for sequence analysis.
Loading...
Searching...
No Matches
utility/concept.hpp
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
2// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
3// SPDX-License-Identifier: BSD-3-Clause
4
9
10#pragma once
11
12#include <concepts>
13#include <type_traits>
14
16
22
23namespace seqan3
24{
36template <typename from, typename to>
39
51template <typename from, typename to>
52concept explicitly_convertible_to = requires { static_cast<to>(std::declval<from>()); };
54
66template <typename t>
69
81
82template <typename t>
83concept builtin_character = std::integral<t>
84 && (std::same_as<t, char> || std::same_as<t, unsigned char> || std::same_as<t, signed char> ||
85#ifdef __cpp_char8_t
86 std::same_as<t, char8_t> ||
87#endif
88 std::same_as<t, char16_t> || std::same_as<t, char32_t> || std::same_as<t, wchar_t>);
90
103template <typename t>
104concept trivially_destructible = std::destructible<t> && std::is_trivially_destructible_v<t>;
106
119template <typename t>
120concept trivially_copyable = std::copyable<t> && std::is_trivially_copyable_v<t>;
122
136template <typename t>
139
151template <typename t>
154
169template <typename t, typename u>
172} // namespace seqan3
T declval(T... args)
A type that satisfies std::is_arithmetic_v<t>.
This concept encompasses exactly the types char, signed char, unsigned char, wchar_t,...
Checks whether from can be explicitly converted to to.
Checks whether from can be implicityly converted to to.
Resolves to std::is_standard_layout_v<t>.
A type that satisfies seqan3::trivially_copyable and seqan3::trivially_destructible.
A type that satisfies std::is_trivially_copyable_v<t>.
A type that satisfies std::is_trivially_destructible_v<t>.
Resolves to std::is_assignable_v<t>.
T is_arithmetic_v
T is_assignable_v
T is_convertible_v
T is_trivially_default_constructible_v
T is_trivially_destructible_v
T is_standard_layout_v
T is_trivially_copyable_v
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
Provides platform and dependency checks.
Hide me