BioC++ core-0.7.0
The Modern C++ libraries for Bioinformatics.
 
Loading...
Searching...
No Matches
bio::meta Namespace Reference

The Meta module's namespace. More...

Namespaces

namespace  list_traits
 Namespace containing traits for working on bio::meta::type_list.
 
namespace  literals
 An inline namespace for meta literals. It exists to safely allow using namespace.
 

Classes

struct  is_type_specialisation_of
 Determines whether a source_type is a specialisation of another template. More...
 
struct  is_type_specialisation_of< source_t, target_template >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
struct  is_value_specialisation_of< source_t, target_template >
 Provides concept bio::meta::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  overloaded
 Wrapper to create an overload set of multiple functors. More...
 
struct  pod_tuple
 Behaves like std::tuple but is an aggregate PODType. More...
 
struct  pod_tuple< type0 >
 Recursion anchor for pod_tuple. More...
 
struct  pod_tuple< type0, types... >
 Behaves like std::tuple but is an aggregate PODType. More...
 
struct  priority_tag
 A tag that allows controlled overload resolution via implicit base conversion rules. More...
 
struct  priority_tag< 0 >
 Recursion anchor for bio::meta::priority_tag. More...
 
struct  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  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  type_list
 Type that contains multiple types. More...
 
struct  valid_template_spec_or
 Exposes templ_t<spec_t...> if that is valid, otherwise fallback_t. More...
 
struct  valid_template_spec_or< fallback_t, templ_t, spec_t... >
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
struct  vtag_t
 The type of bio::meta::vtag. [Declaration]. More...
 
struct  vtag_t< v >
 The type of bio::meta::vtag. [Specialisation for 1 argument]. More...
 
struct  vtag_t< vs... >
 The type of bio::meta::vtag. [Specialisation for 2 or more arguments]. More...
 
struct  vtag_t<>
 The type of bio::meta::vtag. [Specialisation for 0 arguments.]. More...
 

Concepts

concept  weakly_equality_comparable_with
 Requires the two operands to be comparable with == and != in both directions.
 
concept  weakly_ordered_with
 Requires the two operands to be comparable with <, <=, > and >= in both directions.
 
concept  arithmetic
 A type that satisfies std::is_arithmetic_v<t>.
 
concept  floating_point
 An arithmetic type that also satisfies std::is_floating_point_v<t>.
 
concept  one_of
 Resolves to (std::same_as<query_t, other_types> || ...).
 
concept  builtin_character
 This concept encompasses exactly the types char, signed char, unsigned char, wchar_t, char16_t and char32_t.
 
concept  nonint_character
 This concept encompasses exactly the types char, wchar_t, char16_t and char32_t.
 
concept  trivially_destructible
 A type that satisfies std::is_trivially_destructible_v<t>.
 
concept  trivially_copyable
 A type that satisfies std::is_trivially_copyable_v<t>.
 
concept  trivial
 A type that satisfies bio::meta::trivially_copyable and bio::meta::trivially_destructible.
 
concept  standard_layout
 Resolves to std::is_standard_layout_v<t>.
 
concept  weakly_assignable_from
 Resolves to std::is_assignable_v<t>.
 
concept  decays_to
 Resolves to std::same_as<std::decay_t<t>, std::decay_t<u>>.
 
concept  different_from
 The negation of bio::meta::decays_to.
 
concept  constexpr_default_initializable
 A type that is std::default_initializable<t> at compile-time.
 
concept  pair_like
 Whether a type behaves like a tuple with exactly two elements.
 
concept  transformation_trait
 Concept for a transformation trait.
 
concept  unary_type_trait
 Concept for a unary traits type.
 

Typedefs

using ignore_t = std::remove_cvref_t< decltype(std::ignore)>
 Return the type of std::ignore with const, volatile and references removed (type trait).
 
template<typename t >
using 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.
 
template<typename source_type , template< typename... > typename target_template>
using transfer_template_args_onto_t = typename transfer_template_args_onto< source_type, target_template >::type
 Shortcut for bio::meta::transfer_template_args_onto (transformation_trait shortcut).
 
template<typename source_type , template< auto... > typename target_template>
using transfer_template_vargs_onto_t = typename transfer_template_vargs_onto< source_type, target_template >::type
 Shortcut for bio::meta::transfer_template_vargs_onto (transformation_trait shortcut).
 
template<typename type_t , typename default_t >
using transformation_trait_or = std::conditional_t< transformation_trait< type_t >, type_t, std::type_identity< default_t > >
 This gives a fallback type if type_t::type is not defined.
 
template<typename type_t , typename default_t >
using transformation_trait_or_t = typename transformation_trait_or< type_t, default_t >::type
 Helper type of bio::meta::transformation_trait_or (transformation_trait shortcut).
 
template<typename fallback_t , template< typename... > typename templ_t, typename... spec_t>
using valid_template_spec_or_t = typename valid_template_spec_or< fallback_t, templ_t, spec_t... >::type
 Helper for bio::meta::valid_template_spec_or (transformation_trait shortcut).
 

Functions

Tuple utility functions

Helper functions for tuple like objects.

template<size_t pivot_c, template< typename... > typename tuple_t, typename... ts>
requires tuple_like<tuple_t<ts...>>
constexpr auto tuple_split (tuple_t< ts... > const &t)
 Splits a tuple like data structure at the given position.
 
template<size_t pivot_c, template< typename... > typename tuple_t, typename... ts>
requires tuple_like<tuple_t<ts...>>
constexpr auto tuple_split (tuple_t< ts... > &&t)
 Splits a tuple like data structure at the given position.
 
template<typename pivot_t , tuple_like tuple_t>
constexpr auto tuple_split (tuple_t &&t)
 Splits a tuple like data structure at the first position of the given type.
 
template<tuple_like tuple_t>
constexpr auto tuple_pop_front (tuple_t &&t)
 Removes the first element of a tuple.
 

Variables

template<typename... t>
constexpr bool always_false = false
 A trait that is always false. Can be used for static_assert(false). DO NOT SPECIALISE!
 
template<typename t >
constexpr bool decays_to_ignore_v = std::is_same_v<std::remove_cvref_t<t>, ignore_t>
 Return whether the input type with const, volatile and references removed is std::ignore's type. (type trait).
 
template<typename type , typename... more_types>
constinit type_list< type, more_types... > ttag {}
 A type-tag template.
 
template<auto... vs>
constexpr vtag_t< vs... > vtag {}
 A value-tag template.
 

Detailed Description

The Meta module's namespace.