Loading...
Searching...
No Matches
utility/concept.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <concepts>
#include <type_traits>
#include <seqan3/core/platform.hpp>
namespace seqan3
{
template <typename from, typename to>
concept implicitly_convertible_to = std::is_convertible_v<from, to>;
template <typename from, typename to>
concept explicitly_convertible_to = requires { static_cast<to>(std::declval<from>()); };
template <typename t>
concept arithmetic = std::is_arithmetic_v<t>;
template <typename t>
concept builtin_character = std::integral<t>
&& (std::same_as<t, char> || std::same_as<t, unsigned char> || std::same_as<t, signed char> ||
#ifdef __cpp_char8_t
std::same_as<t, char8_t> ||
#endif
std::same_as<t, char16_t> || std::same_as<t, char32_t> || std::same_as<t, wchar_t>);
template <typename t>
concept trivially_destructible = std::destructible<t> && std::is_trivially_destructible_v<t>;
template <typename t>
concept trivially_copyable = std::copyable<t> && std::is_trivially_copyable_v<t>;
template <typename t>
concept trivial = trivially_copyable<t> && trivially_destructible<t> && std::is_trivially_default_constructible_v<t>;
template <typename t>
concept standard_layout = std::is_standard_layout_v<t>;
template <typename t, typename u>
concept weakly_assignable_from = std::is_assignable_v<t, u>;
} // namespace seqan3
std::declval
T declval(T... args)
arithmetic
A type that satisfies std::is_arithmetic_v<t>.
builtin_character
This concept encompasses exactly the types char, signed char, unsigned char, wchar_t,...
explicitly_convertible_to
Checks whether from can be explicitly converted to to.
implicitly_convertible_to
Checks whether from can be implicityly converted to to.
standard_layout
Resolves to std::is_standard_layout_v<t>.
trivial
A type that satisfies seqan3::trivially_copyable and seqan3::trivially_destructible.
trivially_copyable
A type that satisfies std::is_trivially_copyable_v<t>.
trivially_destructible
A type that satisfies std::is_trivially_destructible_v<t>.
weakly_assignable_from
Resolves to std::is_assignable_v<t>.
std::is_arithmetic_v
T is_arithmetic_v
std::is_assignable_v
T is_assignable_v
std::is_convertible_v
T is_convertible_v
std::is_trivially_default_constructible_v
T is_trivially_default_constructible_v
std::is_trivially_destructible_v
T is_trivially_destructible_v
std::is_standard_layout_v
T is_standard_layout_v
std::is_trivially_copyable_v
T is_trivially_copyable_v
seqan3
The main SeqAn3 namespace.
Definition aligned_sequence_concept.hpp:26
platform.hpp
Provides platform and dependency checks.
Hide me