Provides core functionality used by multiple modules. More...
Modules | |
Algorithm | |
Provides core functionality used for algorithms. | |
Concept | |
Provides core concepts. | |
Configuration | |
Provides core functionality used to configure configurations. | |
Debug Stream | |
Provides core functionality used to print seqan3 and std types. | |
Range | |
Provides seqan3 general purpose range functionality. | |
Classes | |
struct | seqan3::detail::customisation_point_object< derived_t, max_priority > |
A CRTP base-class that defines a customisation_point_object (CPO). More... | |
struct | seqan3::detail::deferred_crtp_base< crtp_base, args_t > |
An invocable wrapper that defers the instantiation of a crtp_base class. More... | |
struct | seqan3::detail::deferred_crtp_base_vargs< crtp_base, args > |
An invocable wrapper that defers the instantiation of a crtp_base class. More... | |
interface | derived_from_strong_type |
Defines the requirements of a seqan::detail::strong_type specialisation. More... | |
struct | seqan3::detail::empty_type |
An empty class type used in meta programming. More... | |
struct | seqan3::detail::is_class_template_declarable_with< query_t, args_t > |
An unary type trait that tests whether a template class can be declared with the given template type parameters. More... | |
struct | seqan3::detail::is_type_specialisation_of< source_t, target_template > |
Determines whether a source_type is a specialisation of another template. More... | |
struct | seqan3::detail::is_value_specialisation_of< source_t, target_template > |
Determines whether a source_type is a specialisation of another template. More... | |
struct | seqan3::detail::iter_pointer< it_t > |
This is like std::iter_value_t, but for the pointer type. More... | |
struct | seqan3::detail::maybe_inherited_iterator_category< underling_iterator_t > |
This handles more cases than maybe_iterator_category if you inherit the underling_iterator_t. More... | |
struct | seqan3::detail::maybe_iterator_category< underlying_iterator_t > |
Defines iterator_category member if underlying_iterator_t has a valid std::iterator_traits::iterator_category overload. More... | |
class | seqan3::detail::persist_fn |
[adaptor_def] More... | |
struct | seqan3::pod_tuple< type0 > |
Recursion anchor for pod_tuple. More... | |
struct | seqan3::detail::priority_tag< I > |
A tag that allows controlled overload resolution via implicit base conversion rules. More... | |
class | seqan3::detail::strong_type< value_t, derived_t, skills_ > |
CRTP base class to declare a strong typedef for a regular type to avoid ambiguous parameter settings in function calls. More... | |
interface | template_specialisation_of |
Provides concept seqan3::template_specialisation_of<mytype, [...]> for checking the type specialisation of some type with a given template, for example a specialized type_list<float> with the type_list template. More... | |
struct | seqan3::detail::transfer_template_args_onto< source_template< source_arg_types... >, target_template > |
Extracts a type template's type arguments and specialises another template with them. More... | |
struct | seqan3::detail::transfer_template_vargs_onto< source_template< source_varg_types... >, target_template > |
Extracts a type template's non-type arguments and specialises another template with them. More... | |
struct | seqan3::detail::transfer_type_modifier_onto< source_t, target_t > |
Transfers the type modifier & , && and const (and any combination) to the target type. More... | |
struct | seqan3::detail::type_list_expander< type_list_t< args_t... > > |
Helper class to invoke a meta algorithm on the types contained in a seqan3::type_list. More... | |
struct | seqan3::detail::valid_template_spec_or< fallback_t, templ_t, spec_t > |
Exposes templ_t<spec_t...> if that is valid, otherwise fallback_t . More... | |
class | seqan3::detail::view_persist< urng_t > |
The type returned by seqan3::detail::persist. More... | |
Macros | |
#define | SEQAN3_CPO_OVERLOAD(...) |
A macro that helps to define a seqan3::detail::customisation_point_object. More... | |
#define | SEQAN3_CPO_OVERLOAD_BODY(...) noexcept(auto) { return __VA_ARGS__; } |
A macro helper for SEQAN3_CPO_OVERLOAD. More... | |
#define | SEQAN3_WITH_CEREAL 0 |
Whether CEREAL support is available or not. | |
#define | SEQAN3_WITH_LEMON 0 |
Whether Lemon support is available or not. | |
Typedefs | |
template<typename deferred_crtp_base_t , typename derived_t > | |
using | seqan3::detail::invoke_deferred_crtp_base = typename deferred_crtp_base_t::template invoke< derived_t > |
Template alias to instantiate the deferred crtp base with the derived class. More... | |
template<typename it_t > | |
using | seqan3::detail::iter_pointer_t = typename iter_pointer< it_t >::type |
Return the pointer type of the input type (transformation_trait shortcut). More... | |
template<typename it_t > | |
using | seqan3::detail::iterator_concept_tag_t = std::conditional_t< std::contiguous_iterator< it_t >, std::contiguous_iterator_tag, std::conditional_t< std::random_access_iterator< it_t >, std::random_access_iterator_tag, std::conditional_t< std::bidirectional_iterator< it_t >, std::bidirectional_iterator_tag, std::conditional_t< std::forward_iterator< it_t >, std::forward_iterator_tag, std::conditional_t< std::input_iterator< it_t >, std::input_iterator_tag, std::output_iterator_tag > >> >> |
Exposes the iterator_concept from the modelled concept. More... | |
using | seqan3::semiregular_box = ::ranges::semiregular_box |
Utility wrapper that behaves like std::optional but makes the type conform with the std::semiregular concept. Imported from ranges::semiregular_box. More... | |
using | seqan3::semiregular_box_t = ::ranges::semiregular_box_t |
Utility transformation trait to get a wrapper type that models std::semiregular. Imported from ranges::semiregular_box_t. More... | |
template<typename t > | |
using | seqan3::detail::strip_type_identity_t = std::conditional_t< is_type_specialisation_of_v< t, std::type_identity >, transformation_trait_or_t< t, void >, t > |
A transformation trait shortcut that returns the type inside a std::type_identity or the type itself. More... | |
template<typename source_type , template< typename ... > typename target_template> | |
using | seqan3::detail::transfer_template_args_onto_t = typename transfer_template_args_onto< source_type, target_template >::type |
Shortcut for seqan3::detail::transfer_template_args_onto (transformation_trait shortcut). More... | |
template<typename source_type , template< auto ... > typename target_template> | |
using | seqan3::detail::transfer_template_vargs_onto_t = typename transfer_template_vargs_onto< source_type, target_template >::type |
Shortcut for seqan3::detail::transfer_template_vargs_onto (transformation_trait shortcut). More... | |
template<typename fallback_t , template< typename ... > typename templ_t, typename ... spec_t> | |
using | seqan3::detail::valid_template_spec_or_t = typename valid_template_spec_or< fallback_t, templ_t, spec_t... >::type |
Helper for seqan3::detail::valid_template_spec_or (transformation_trait shortcut). More... | |
Enumerations | |
enum class | seqan3::detail::strong_type_skill { none = 0 , add = 1 << 0 , subtract = 1 << 1 , multiply = 1 << 2 , divide = 1 << 3 , modulo = 1 << 4 , bitwise_and = 1 << 5 , bitwise_or = 1 << 6 , bitwise_xor = 1 << 7 , bitwise_not = 1 << 8 , bitwise_lshift = 1 << 9 , bitwise_rshift = 1 << 10 , logical_and = 1 << 11 , logical_or = 1 << 12 , logical_not = 1 << 13 , increment = 1 << 14 , decrement = 1 << 15 , convert = 1 << 16 , comparable = 1 << 17 , additive = add | subtract , multiplicative = multiply | divide | modulo , bitwise_logic = bitwise_and | bitwise_or | bitwise_xor | bitwise_not , bitwise_shift = bitwise_lshift | bitwise_rshift , logic = logical_and | logical_or | logical_not } |
Enum class for all supported operations that can be added to a seqan3::detail::strong_type. More... | |
Functions | |
template<typename type_list_t , typename unary_predicate_t > | |
constexpr bool | seqan3::detail::all_of (unary_predicate_t &&fn) |
Tests whether a given predicate evaluates to true for each type in a seqan3::type_list. More... | |
template<typename unary_predicate_t , typename ... pack_t> | |
constexpr bool | seqan3::detail::all_of (unary_predicate_t &&fn, pack_t &&...args) |
Tests whether a given predicate evaluates to true for each element in the function parameter pack. More... | |
template<std::unsigned_integral unsigned_t> | |
constexpr unsigned_t | seqan3::detail::ceil_log2 (unsigned_t const n) noexcept |
Computes the ceil of the logarithm to the base of two for unsigned integers. More... | |
template<std::unsigned_integral unsigned_t> | |
constexpr unsigned_t | seqan3::detail::floor_log2 (unsigned_t const n) noexcept |
Computes the floor of the logarithm to the base of two for unsigned integers. More... | |
template<typename type_list_t , typename unary_function_t > | |
constexpr void | seqan3::detail::for_each (unary_function_t &&fn) |
Applies a function element wise to all types of a type list. More... | |
template<typename unary_function_t , typename ... pack_t> | |
constexpr void | seqan3::detail::for_each (unary_function_t &&fn, pack_t &&...args) |
Applies a function to each element of the given function parameter pack. More... | |
template<typename base_t , std::unsigned_integral exp_t> | |
base_t | seqan3::pow (base_t base, exp_t exp) |
Computes the value of base raised to the power exp . More... | |
Variables | |
template<typename t > | |
constexpr bool | seqan3::add_enum_bitwise_operators = false |
Set to true for a scoped enum to have binary operators overloaded. More... | |
template<typename t > | |
constexpr bool | seqan3::detail::is_type_list_of_sequence_file_input_formats_v = false |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::sequence_file_input_format [default is false]. More... | |
template<typename ... ts> | |
constexpr bool | seqan3::detail::is_type_list_of_sequence_file_input_formats_v< type_list< ts... > > |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::sequence_file_input_format [overload]. More... | |
template<typename t > | |
constexpr bool | seqan3::detail::is_type_list_of_structure_file_input_formats_v = false |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_input_format [default is false]. More... | |
template<typename ... ts> | |
constexpr bool | seqan3::detail::is_type_list_of_structure_file_input_formats_v< type_list< ts... > > = (structure_file_input_format<ts> && ...) |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_input_format [overload]. More... | |
template<typename t > | |
constexpr bool | seqan3::detail::is_type_list_of_structure_file_output_formats_v = false |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_output_format [default is false]. More... | |
template<typename ... ts> | |
constexpr bool | seqan3::detail::is_type_list_of_structure_file_output_formats_v< type_list< ts... > > = (structure_file_output_format<ts> && ...) |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_output_format [overload]. More... | |
constexpr auto | seqan3::detail::persist |
[adaptor_def] More... | |
template<typename t > | |
SEQAN3_CONCEPT | seqan3::detail::type_list_of_sequence_file_input_formats = is_type_list_of_sequence_file_input_formats_v<t> |
Auxiliary concept that checks whether a type is a seqan3::type_list and all types meet seqan3::sequence_file_input_format. More... | |
template<typename t > | |
SEQAN3_CONCEPT | seqan3::detail::type_list_of_structure_file_input_formats = is_type_list_of_structure_file_input_formats_v<t> |
Auxiliary concept that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_input_format. More... | |
template<typename t > | |
SEQAN3_CONCEPT | seqan3::detail::type_list_of_structure_file_output_formats = is_type_list_of_structure_file_output_formats_v<t> |
Auxiliary concept that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_output_format. More... | |
template<typename type > | |
std::string const | seqan3::detail::type_name_as_string |
Defines the human-readable name of the given type using the typeid operator. More... | |
Provides core functionality used by multiple modules.
The core module contains concepts, functions and some classes that are used by multiple other modules, but that usually are not relevant to most users of the library.
#define SEQAN3_CPO_OVERLOAD | ( | ... | ) |
A macro that helps to define a seqan3::detail::customisation_point_object.
DEV
Expands to a function definition with the name cpo_overload
.
It puts the given expression via SEQAN3_CPO_OVERLOAD_BODY as a single return statement in the function body, the noexcept declaration and requires declaration.
expands to something similar to
#define SEQAN3_CPO_OVERLOAD_BODY | ( | ... | ) | noexcept(auto) { return __VA_ARGS__; } |
A macro helper for SEQAN3_CPO_OVERLOAD.
DEV
Please note that in order to allow a semicolon at the end when using this macro, i.e.
we need some expression at the end of the macro that can have a semicolon appended. We chose static_assert(true)
for that reason.
using seqan3::detail::invoke_deferred_crtp_base = typedef typename deferred_crtp_base_t::template invoke<derived_t> |
Template alias to instantiate the deferred crtp base with the derived class.
deferred_crtp_base_t | The deferred crtp base class. |
derived_t | The derived type to instantiate the crtp base class with. |
Effectively declares the type resulting from deferred_crtp_base_t::template invoke<derived_t>
.
using seqan3::detail::iter_pointer_t = typedef typename iter_pointer<it_t>::type |
Return the pointer
type of the input type (transformation_trait shortcut).
it_t | The type to operate on. |
using seqan3::detail::iterator_concept_tag_t = typedef std::conditional_t< std::contiguous_iterator<it_t>, std::contiguous_iterator_tag, std::conditional_t< std::random_access_iterator<it_t>, std::random_access_iterator_tag, std::conditional_t< std::bidirectional_iterator<it_t>, std::bidirectional_iterator_tag, std::conditional_t< std::forward_iterator<it_t>, std::forward_iterator_tag, std::conditional_t< std::input_iterator<it_t>, std::input_iterator_tag, std::output_iterator_tag> >> >> |
Exposes the iterator_concept from the modelled concept.
it_t | The type to operate on. |
using seqan3::semiregular_box = typedef ::ranges::semiregular_box |
Utility wrapper that behaves like std::optional but makes the type conform with the std::semiregular concept. Imported from ranges::semiregular_box.
using seqan3::semiregular_box_t = typedef ::ranges::semiregular_box_t |
Utility transformation trait to get a wrapper type that models std::semiregular. Imported from ranges::semiregular_box_t.
using seqan3::detail::strip_type_identity_t = typedef std::conditional_t<is_type_specialisation_of_v<t, std::type_identity>, transformation_trait_or_t<t, void>, t> |
A transformation trait shortcut that returns the type inside a std::type_identity or the type itself.
t | The type to operate on. |
using seqan3::detail::transfer_template_args_onto_t = typedef typename transfer_template_args_onto<source_type, target_template>::type |
Shortcut for seqan3::detail::transfer_template_args_onto (transformation_trait shortcut).
using seqan3::detail::transfer_template_vargs_onto_t = typedef typename transfer_template_vargs_onto<source_type, target_template>::type |
Shortcut for seqan3::detail::transfer_template_vargs_onto (transformation_trait shortcut).
using seqan3::detail::valid_template_spec_or_t = typedef typename valid_template_spec_or<fallback_t, templ_t, spec_t...>::type |
Helper for seqan3::detail::valid_template_spec_or (transformation_trait shortcut).
fallback_t | The fallback type. |
templ_t | The type template that should be specialised. |
spec_t | The specialisation for the type template. |
|
strong |
Enum class for all supported operations that can be added to a seqan3::detail::strong_type.
|
constexpr |
Tests whether a given predicate evaluates to true
for each type in a seqan3::type_list.
list_t | A type list; must model seqan3::detail::template_specialisation_of a seqan3::type_list |
unary_predicate_t | The function type, like function pointers, functors and lambdas; must model std::predicate expanded on each argument type wrapped in std::type_identity. |
[in] | fn | The predicate called for every type in the seqan3::type_list. |
true
if the predicate returns true
for each type in the type list, false
otherwise.This function operates on types instead of values. The following steps are performed to call the passed predicate on the types contained in the type list:
Note that wrapping the types in std::type_identity is a technical trick to make a type representable as a value. Instantiating a type might not work because they might not be std::default_initializable. In addition it is possible, to invoke the predicate on incomplete types.
Linear in the number of types in the seqan3::type_list.
[Compile-time complexity: Linear number of template instantiations.]
|
constexpr |
Tests whether a given predicate evaluates to true
for each element in the function parameter pack.
unary_predicate_t | The function type, like function pointers, functors and lambdas; must model std::predicate expanded on each argument type. |
pack_t | The parameter pack of the arguments (each argument type can be different). |
[in] | fn | The predicate to evaluate for every argument. |
[in] | args | The parameter pack. |
true
if the predicate returns true
for each type in the type list, false
otherwise.This function behaves like std::all_of but on parameter packs. The invocation(s) will be done without any loop.
Linear in the number of elements in the pack.
|
constexprnoexcept |
Computes the ceil of the logarithm to the base of two for unsigned integers.
[in] | n | An unsigned integer. |
The difference to std::ceil(std::log2(n))
is that everything is computed exactly (without precision loss due to promoting to double
)
No-throw guarantee.
Thread safe.
Constant.
|
constexprnoexcept |
Computes the floor of the logarithm to the base of two for unsigned integers.
[in] | n | An unsigned integer. |
The difference to std::floor(std::log2(n))
is that everything is computed exactly (without precision loss due to promoting to double
)
No-throw guarantee.
Thread safe.
Constant.
|
constexpr |
Applies a function element wise to all types of a type list.
list_t | A type list; must model seqan3::detail::template_specialisation_of a seqan3::type_list. |
unary_function_t | The function type, like function pointers, functors and lambdas; must model std::invocable on each type of the type list wrapped in std::type_identity. |
[in] | fn | The function to call on every type contained in the list. |
This function operates on types instead of values. The following steps are performed to call the passed unary function on the types contained in the type list:
Note that wrapping the types in std::type_identity is a technical trick to make a type representable as a value. Instantiating a type might not work because they might not be std::default_initializable. In addition, it is possible to invoke the unary function on incomplete types.
Linear in the number of types in the seqan3::type_list.
[Compile-time complexity: Linear number of template instantiations.]
|
constexpr |
Applies a function to each element of the given function parameter pack.
unary_function_t | The function type, like function pointers, functors and lambdas. |
pack_t | The parameter pack of the arguments (each argument type can be different). |
[in] | fn | The function to call on every argument. |
[in] | args | The parameter pack. |
This function behaves like std::for_each but on parameter packs. The invocation(s) will be done without any loop.
Linear in the number of elements in the pack.
base_t seqan3::pow | ( | base_t | base, |
exp_t | exp | ||
) |
Computes the value of base
raised to the power exp
.
[in] | base | The base to compute the power for. |
[in] | exp | The power to raise base to. |
std::overflow_error | if an overflow occurs (Only in Debug build). |
std::underflow_error | if an underflow occurs (Only in Debug build). |
The difference to std::pow
is that the powers of an integer base
are computed exact (without precision loss due to promoting to double
) iff exp_t
models std::unsigned_integral
and
base_t
models std::unsigned_integral
(returns uint64_t
)base_t
models std::integral
, but not std::unsigned_integral
(returns int64_t
)In all other cases the return value and type is equivalent to that of std::pow
.
|
constexpr |
Set to true for a scoped enum to have binary operators overloaded.
If this type trait is specialised for an enum, the binary operators &
, |
, ^
, ~
, &=
, |=
, ^=
will be added and behave just like for ints or unscoped enums.
|
constexpr |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::sequence_file_input_format [default is false].
|
constexpr |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::sequence_file_input_format [overload].
|
constexpr |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_input_format [default is false].
|
constexpr |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_input_format [overload].
|
constexpr |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_output_format [default is false].
|
constexpr |
Auxiliary value metafuncton that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_output_format [overload].
|
inlineconstexpr |
[adaptor_def]
A view adaptor that wraps rvalue references of non-views.
urng_t | The type of the range being processed. See below for requirements. [template parameter is omitted in pipe notation] |
[in] | urange | The range being processed. [parameter is omitted in pipe notation] |
Header File
#include <seqan3/core/detail/persist_view.hpp>
For ranges that model std::ranges::viewable_range, this adaptor just returns std::views::all. However this adaptor can also take ranges that are not "viewable", e.g. temporaries of containers. It wraps them in a shared pointer internally so all view requirements like constant copy are satisfied. However construction and copying might be slightly slower, because of reference counting.
Concepts and traits | urng_t (underlying range type) | rrng_t (returned range type) |
---|---|---|
std::ranges::input_range | required | preserved |
std::ranges::forward_range | preserved | |
std::ranges::bidirectional_range | preserved | |
std::ranges::random_access_range | preserved | |
std::ranges::contiguous_range | preserved | |
std::ranges::viewable_range | not required | guaranteed |
std::ranges::view | guaranteed | |
std::ranges::sized_range | preserved | |
std::ranges::common_range | preserved | |
std::ranges::output_range | preserved | |
seqan3::const_iterable_range | preserved | |
std::ranges::range_reference_t | std::ranges::range_reference_t<urng_t> |
See the views submodule documentation for detailed descriptions of the view properties.
SEQAN3_CONCEPT seqan3::detail::type_list_of_sequence_file_input_formats = is_type_list_of_sequence_file_input_formats_v<t> |
Auxiliary concept that checks whether a type is a seqan3::type_list and all types meet seqan3::sequence_file_input_format.
SEQAN3_CONCEPT seqan3::detail::type_list_of_structure_file_input_formats = is_type_list_of_structure_file_input_formats_v<t> |
Auxiliary concept that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_input_format.
SEQAN3_CONCEPT seqan3::detail::type_list_of_structure_file_output_formats = is_type_list_of_structure_file_output_formats_v<t> |
Auxiliary concept that checks whether a type is a seqan3::type_list and all types meet seqan3::structure_file_output_format.
|
inline |
Defines the human-readable name of the given type using the typeid operator.
type | The type to get the human-readable name for. |
On gcc and clang std::type_info only returns a mangled name. The mangled name can be converted to human-readable form using implementation-specific API such as abi::__cxa_demangle. In other implementations the name returned is already human-readable.