sparrow ..
|
#include <concepts>
#include <cstdint>
#include <iterator>
#include <memory>
#include <ranges>
#include <tuple>
#include <type_traits>
Go to the source code of this file.
Namespaces | |
namespace | sparrow |
namespace | sparrow::mpl |
namespace | sparrow::mpl::impl |
namespace | sparrow::mpl::predicate |
Concepts | |
concept | sparrow::mpl::any_typelist |
Concept that matches any typelist instantiation. | |
concept | sparrow::mpl::type_wrapper |
Concept for template types that can wrap a single type. | |
concept | sparrow::mpl::ct_type_predicate |
Concept for compile-time type predicates. | |
concept | sparrow::mpl::callable_type_predicate |
Concept for callable type predicates. | |
concept | sparrow::mpl::constant_iterator |
Concept for constant iterators. | |
concept | sparrow::mpl::constant_range |
Concept for constant ranges. | |
concept | sparrow::mpl::bool_convertible_range |
Concept for ranges whose elements are convertible to bool. | |
concept | sparrow::mpl::boolean_like |
Concept for boolean-like types. | |
concept | sparrow::mpl::convertible_ranges |
Concept for convertible range types. | |
concept | sparrow::mpl::unique_ptr |
Concept for unique_ptr instances. | |
concept | sparrow::mpl::unique_ptr_or_derived |
Concept for unique_ptr or derived types. | |
concept | sparrow::mpl::shared_ptr |
Concept for shared_ptr instances. | |
concept | sparrow::mpl::shared_ptr_or_derived |
Concept for shared_ptr or derived types. | |
concept | sparrow::mpl::smart_ptr |
Concept for any smart pointer type. | |
concept | sparrow::mpl::smart_ptr_and_derived |
Concept for smart pointers and derived types. | |
concept | sparrow::mpl::testable |
Concept for testable types in boolean contexts. | |
concept | sparrow::mpl::T_matches_qualifier_if_Y_is |
Concept for matching qualifier requirements. | |
concept | sparrow::mpl::iterator_of_type |
Concept for iterators of a specific value type. | |
concept | sparrow::mpl::char_like |
Concept for character-like types. | |
concept | sparrow::mpl::std_array |
Concept for std::array types. | |
concept | sparrow::mpl::weakly_equality_comparable_with |
Typedefs | |
template<class TypeList, class... Us> | |
using | sparrow::mpl::append_t = decltype(append(TypeList{}, Us{}...)) |
Type alias for appending types or typelists to a given typelist. | |
template<class From, template< class... > class To> | |
using | sparrow::mpl::rename = typename impl::rename_impl<From, To>::type |
Changes the template type of a type list. | |
template<template< class > class F, class... L> | |
using | sparrow::mpl::transform = typename impl::transform_impl<F, L...>::type |
Applies a metafunction to each element of typelists. | |
template<class L1, class L2> | |
using | sparrow::mpl::merge_set = typename impl::merge_set_impl<L1, L2>::type |
Generates the union of two typelists, removing duplicates. | |
template<class L> | |
using | sparrow::mpl::unique = typename impl::unique_impl<L>::type |
Removes all duplicated types in the given typelist Example: unique<typelist<int, float, double, float, int> gives typelist<int, float, double> | |
template<class T> | |
using | sparrow::mpl::add_const_lvalue_reference_t = typename add_const_lvalue_reference<T>::type |
Convenience alias for add_const_lvalue_reference. | |
template<class T, bool is_const> | |
using | sparrow::mpl::constify_t = typename constify<T, is_const>::type |
Convenience alias for constify. | |
template<class T> | |
using | sparrow::mpl::iter_const_reference_t = std::common_reference_t<const std::iter_value_t<T>&&, std::iter_reference_t<T>> |
Computes the const reference type of an iterator. | |
Functions | |
template<class... Ts, class... Us> requires (!is_type_instance_of_v<Us, typelist> && ...) | |
consteval auto | sparrow::mpl::append (typelist< Ts... >, Us...) |
Appends individual types to a typelist. | |
template<class... Ts, class... Us> | |
consteval auto | sparrow::mpl::append (typelist< Ts... >, typelist< Us... >) |
Appends two typelists together. | |
template<class... T> | |
constexpr std::size_t | sparrow::mpl::size (typelist< T... >={}) |
Gets the count of types contained in a typelist. | |
template<class T, template< class > class P> requires ct_type_predicate<P, T> | |
consteval bool | sparrow::mpl::evaluate (P< T >) |
Evaluates a compile-time template predicate. | |
template<class T, callable_type_predicate< T > P> | |
consteval bool | sparrow::mpl::evaluate (P predicate) |
Evaluates a callable type predicate. | |
template<template< class > class P> | |
consteval auto | sparrow::mpl::as_predicate () |
template<class Predicate, template< class... > class L, class... T> requires any_typelist<L<T...>> and (callable_type_predicate<Predicate, T> && ...) | |
consteval bool | sparrow::mpl::any_of (L< T... >, Predicate predicate={}) |
Checks if at least one type in the typelist satisfies the predicate. | |
template<template< class > class Predicate, template< class... > class L, class... T> requires any_typelist<L<T...>> and (ct_type_predicate<Predicate, T> && ...) | |
consteval bool | sparrow::mpl::any_of (L< T... > list) |
Checks if at least one type satisfies the compile-time predicate. | |
template<class Predicate, template< class... > class L, class... T> requires any_typelist<L<T...>> and (callable_type_predicate<Predicate, T> && ...) | |
consteval bool | sparrow::mpl::all_of (L< T... >, Predicate predicate) |
Checks if all types in the typelist satisfy the predicate. | |
template<template< class > class Predicate, template< class... > class L, class... T> requires any_typelist<L<T...>> and (ct_type_predicate<Predicate, T> && ...) | |
consteval bool | sparrow::mpl::all_of (L< T... > list) |
Checks if all types satisfy the compile-time predicate. | |
template<class Predicate, template< class... > class L, class... T> requires any_typelist<L<T...>> and (callable_type_predicate<Predicate, T> && ...) | |
consteval std::size_t | sparrow::mpl::find_if (L< T... >, Predicate predicate) |
Finds the index of the first type satisfying the predicate. | |
template<template< class > class Predicate, template< class... > class L, class... T> requires any_typelist<L<T...>> and (ct_type_predicate<Predicate, T> && ...) | |
consteval std::size_t | sparrow::mpl::find_if (L< T... > list) |
Finds the index of the first type satisfying the compile-time predicate. | |
template<class TypeToFind, any_typelist L> | |
consteval std::size_t | sparrow::mpl::find (L list) |
Finds the index of a specific type in the typelist. | |
template<any_typelist L, class V> | |
consteval bool | sparrow::mpl::contains () |
Checks if a typelist contains a specific type. | |
void | sparrow::mpl::unreachable () |
Invokes undefined behavior for optimization purposes. | |
Variables | |
template<class T, template< class... > class U> | |
constexpr bool | sparrow::mpl::is_type_instance_of_v = is_type_instance_of<T, U>::value |
Variable template for convenient access to is_type_instance_of. | |
template<class CLS, class... ARGS> | |
constexpr bool | sparrow::mpl::excludes_copy_and_move_ctor_v = excludes_copy_and_move_ctor<CLS, ARGS...>::value |
Convenience variable template for excludes_copy_and_move_ctor. | |