Concept

Adaptions of core concepts from the Ranges TS.

Author
Rene Rahn <rene.rahn AT fu-berlin.de>

namespace seqan3

The main SeqAn3 namespace.

Helpers for seqan3::semi_alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.

Helpers for seqan3::alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.

Helpers for seqan3::nucleotide_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.

Alphabet aliases

Other names (typedefs) for seqan3::nucl16

Core Language Concepts

concept bool seqan3::same_concept = static_cast<bool>(ranges::Same<ts...>())

Resolves to ranges::Same<types...>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Same

concept bool seqan3::derived_from_conept = static_cast<bool>(ranges::DerivedFrom<t, u>())

Resolves to ranges::DerivedFrom<type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/DerivedFrom

concept bool seqan3::implicitly_convertible_to_concept = static_cast<bool>(ranges::ImplicitlyConvertibleTo<t, u>())

Resolves to ranges::ImplicitlyConvertibleTo<type1, type2>()

concept bool seqan3::explicitly_convertible_to_concept = static_cast<bool>(ranges::ExplicitlyConvertibleTo<t, u>())

Resolves to ranges::ExplicitlyConvertibleTo<type1, type2>()

concept bool seqan3::convertible_to_concept = implicitly_convertible_to_concept<t, u> && explicitly_convertible_to_concept<t, u>

Resolves to ranges::ConvertibleTo<type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/ConvertibleTo

concept bool seqan3::common_reference_concept = static_cast<bool>(ranges::CommonReference<t, u, rest...>())

Resolves to ranges::CommonReference<type1, type2, rest...>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/CommonReference

concept bool seqan3::common_concept = static_cast<bool>(ranges::Common<t, u, rest...>())

Resolves to ranges::Common<type1, type2, rest...>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Common

concept bool seqan3::integral_concept = static_cast<bool>(ranges::Integral<t>())

Resolves to ranges::Integral<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Integral

concept bool seqan3::signed_integral_concept = integral_concept<t> && static_cast<bool>(ranges::SignedIntegral<t>())

Resolves to ranges::SignedIntegral<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/SignedIntegral

concept bool seqan3::unsigned_integral_concept = integral_concept<t> && static_cast<bool>(ranges::UnsignedIntegral<t>())

Resolves to ranges::UnsignedIntegral<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/UnsignedIntegral

concept bool seqan3::assignable_concept = static_cast<bool>(ranges::Assignable<t, u>())

Resolves to ranges::Assignable<type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Assignable

concept bool seqan3::swappable_concept = static_cast<bool>(ranges::Swappable<t, u>())

Resolves to ranges::Swappable<type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Swappable

Comparison concepts.

concept bool seqan3::weakly_equality_comparable_concept = static_cast<bool>(ranges::WeaklyEqualityComparable<t, u>())

Resolves to ranges::WeaklyEqualityComparable<type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/WeaklyEqualityComparable

concept bool seqan3::equality_comparable_concept = static_cast<bool>(ranges::EqualityComparable<t, u>())

Resolves to ranges::EqualityComparable<type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/EqualityComparable

concept bool seqan3::weakly_ordered_concept = static_cast<bool>(ranges::WeaklyOrdered<t>())

Resolves to ranges::WeaklyOrdered<type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/WeaklyOrdered

concept bool seqan3::totally_ordered_concept = equality_comparable_concept<t, u> && weakly_ordered_concept<t, u> && static_cast<bool>(ranges::TotallyOrdered<t, u>())

Resolves to ranges::TotallyOrdered<type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/TotallyOrdered

Object Concepts.

concept bool seqan3::destructible_concept = static_cast<bool>(ranges::Destructible<t>())

Resolves to ranges::Destructible<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Destructible

concept bool seqan3::constructible_concept = destructible_concept<t> && static_cast<bool>(ranges::Constructible<t, args...>())

Resolves to ranges::Constructible<type, args...>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Constructible

concept bool seqan3::default_constructible_concept = constructible_concept<t> && static_cast<bool>(ranges::DefaultConstructible<t>())

Resolves to ranges::DefaultConstructible<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/DefaultConstructible

concept bool seqan3::move_constructible_concept = static_cast<bool>(ranges::MoveConstructible<t>())

Resolves to ranges::MoveConstructible<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/MoveConstructible

concept bool seqan3::copy_constructible_concept = move_constructible_concept<t> && static_cast<bool>(ranges::CopyConstructible<t>())

Resolves to ranges::CopyConstructible<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/CopyConstructible

concept bool seqan3::movable_concept = move_constructible_concept<t> && static_cast<bool>(ranges::Movable<t>())

Resolves to ranges::Movable<types...>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Movable

concept bool seqan3::copyable_concept = movable_concept<t> && copy_constructible_concept<t> && static_cast<bool>(ranges::Copyable<t>())

Resolves to ranges::Copyable<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Copyable

concept bool seqan3::semi_regular_concept = copyable_concept<t> && default_constructible_concept<t>

Resolves to ranges::SemiRegular<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/SemiRegular

concept bool seqan3::regular_concept = semi_regular_concept<t> && equality_comparable_concept<t>

Resolves to ranges::Regular<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Regular

Callable Concepts.

concept bool seqan3::invocable_concept = static_cast<bool>(ranges::Invocable<f, args...>())

Resolves to ranges::Invocable<func, ...args>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Invocable

concept bool seqan3::regular_invocable_concept = invocable_concept<f, args...> && static_cast<bool>(ranges::RegularInvocable<f, args...>())

Resolves to ranges::RegularInvocable<func, ...args>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/RegularInvocable

concept bool seqan3::predicate_concept = regular_invocable_concept<f, args...> && static_cast<bool>(ranges::Predicate<f, args...>())

Resolves to ranges::Predicate<func, ...args>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Predicate

concept bool seqan3::relation_concept = static_cast<bool>(ranges::Relation<f, t, u>())

Resolves to ranges::Relation<func, type1, type2>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/concepts/Relation

Range concepts

Adapted from the Ranges TS.

Container concepts

Container concepts as defined by the standard library (or very close).

Container-of-container concepts

Shortcuts for multi-dimensional container concepts.

Testing the core library concepts.

Author
Rene Rahn <rene.rahn AT fu-berlin.de>

namespace test_core_concepts

Functions

bool operator==(type_a const&, type_b const&)
bool operator==(type_b const&, type_a const&)
bool operator==(type_b const&, type_b const&)
bool operator==(type_d const&, type_b const&)
bool operator==(type_b const&, type_d const&)
bool operator==(type_d const&, type_d const&)
bool operator==(type_c const&, type_c const&)
bool operator!=(type_a const&, type_b const&)
bool operator!=(type_b const&, type_a const&)
bool operator!=(type_b const&, type_b const&)
bool operator!=(type_d const&, type_b const&)
bool operator!=(type_b const&, type_d const&)
bool operator!=(type_d const&, type_d const&)
bool operator!=(type_c const&, type_c const&)
bool operator<(type_a const&, type_a const&)
bool operator<(type_a const&, type_b const&)
bool operator<(type_b const&, type_b const&)
bool operator<(type_b const&, type_a const&)
bool operator>(type_a const&, type_a const&)
bool operator>(type_a const&, type_b const&)
bool operator>(type_b const&, type_b const&)
bool operator>(type_b const&, type_a const&)
bool operator<=(type_a const&, type_a const&)
bool operator<=(type_a const&, type_b const&)
bool operator<=(type_b const&, type_b const&)
bool operator<=(type_b const&, type_a const&)
bool operator>=(type_a const&, type_a const&)
bool operator>=(type_a const&, type_b const&)
bool operator>=(type_b const&, type_b const&)
bool operator>=(type_b const&, type_a const&)
bool operator<(type_d const&, type_d const&)
bool operator<(type_d const&, type_b const&)
bool operator<(type_b const&, type_d const&)
bool operator>(type_d const&, type_d const&)
bool operator>(type_d const&, type_b const&)
bool operator>(type_b const&, type_d const&)
bool operator<=(type_d const&, type_d const&)
bool operator<=(type_d const&, type_b const&)
bool operator<=(type_b const&, type_d const&)
bool operator>=(type_d const&, type_d const&)
bool operator>=(type_d const&, type_b const&)
bool operator>=(type_b const&, type_d const&)
struct type_a
#include <core/concept/core_detail.hpp>

Helper struct for testing core concepts.

Subclassed by seqan3::detail::test_core_concepts::type_b

struct type_b
#include <core/concept/core_detail.hpp>

Helper struct for testing core concepts.

Inherits from seqan3::detail::test_core_concepts::type_a

Subclassed by seqan3::detail::test_core_concepts::type_d

Public Functions

type_b(type_b const&)
type_b(type_b&&)
type_b &operator=(type_b const&)
type_b &operator=(type_b&&)
template <typename... args>
bool operator()(args&&...)
struct type_c
#include <core/concept/core_detail.hpp>

Helper struct for testing core concepts.

Public Functions

type_c()
type_c(type_b const&)
type_c(type_a const&)
template <typename... args>
void operator()(args&&...)
struct type_d
#include <core/concept/core_detail.hpp>

Helper struct for testing core concepts.

Inherits from seqan3::detail::test_core_concepts::type_b

Public Functions

type_d()
type_d(type_d const&)
type_d(type_d&&)
type_d &operator=(type_d const&)
type_d &operator=(type_d&&)
~type_d()
template <typename t1, typename t2>
void operator()(t1&&, t2&&)
template <typename t>
bool operator()(t&&, t&&)
template <typename... args>
bool operator()(args&&...)

Adaptions of Iterator concepts from the Ranges TS.

Author
Rene Rahn <rene.rahn AT fu-berlin.de>

namespace seqan3

The main SeqAn3 namespace.

Helpers for seqan3::semi_alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::semi_alphabet_concept.

Helpers for seqan3::alphabet_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::alphabet_concept.

Helpers for seqan3::nucleotide_concept

These functions and metafunctions expose member variables and types so that they satisfy seqan3::nucleotide_concept.

Alphabet aliases

Other names (typedefs) for seqan3::nucl16

Iterator Concepts

concept bool seqan3::readable_concept = static_cast<bool>(ranges::Readable<t>())

Resolves to ranges::Readable<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/iterator/Readable

concept bool seqan3::writable_concept = static_cast<bool>(ranges::Writable<out, t>())

Resolves to ranges::Writable<out_type, type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/iterator/Writable

concept bool seqan3::weakly_incrementable_concept = semi_regular_concept<i> && static_cast<bool>(ranges::WeaklyIncrementable<i>())

Resolves to ranges::WeaklyIncrementable<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/iterator/WeaklyIncrementable

concept bool seqan3::incrementable_concept = regular_concept<i> && weakly_incrementable_concept<i> && static_cast<bool>(ranges::Incrementable<i>())

Resolves to ranges::Incrementable<type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/iterator/Incrementable

concept bool seqan3::iterator_concept = weakly_incrementable_concept<i> && copyable_concept<i> && static_cast<bool>(ranges::Iterator<i>())

Resolves to ranges::Iterator<iterator_type>()

See
http://en.cppreference.com/w/cpp/concept/Iterator

concept bool seqan3::sentinel_concept = semi_regular_concept<s> && iterator_concept<i> && static_cast<bool>(ranges::Sentinel<s, i>())

Resolves to ranges::Sentinel<sentinel_type, iterator_type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/iterator/Sentinel

concept bool seqan3::sized_sentinel_concept = sentinel_concept<s, i> && static_cast<bool>(ranges::SizedSentinel<s, i>())

Resolves to ranges::SizedSentinel<sentinel_type, iterator_type>()

See
http://en.cppreference.com/w/cpp/experimental/ranges/iterator/SizedSentinel

concept bool seqan3::output_iterator_concept = iterator_concept<out> && writable_concept<out, t> && static_cast<bool>(ranges::OutputIterator<out, t>())

Resolves to ranges::OutputIterator<iterator_type, type>()

See
http://en.cppreference.com/w/cpp/concept/OutputIterator

concept bool seqan3::input_iterator_concept = iterator_concept<i> && readable_concept<i> && static_cast<bool>(ranges::InputIterator<i>())

Resolves to ranges::InputIterator<iterator_type>()

See
http://en.cppreference.com/w/cpp/concept/InputIterator

concept bool seqan3::forward_iterator_concept = input_iterator_concept<i> && incrementable_concept<i> && sentinel_concept<i, i> && static_cast<bool>(ranges::ForwardIterator<i>())

Resolves to ranges::ForwardIterator<iterator_type>()

See
http://en.cppreference.com/w/cpp/concept/ForwardIterator

concept bool seqan3::bidirectional_iterator_concept = forward_iterator_concept<i> && static_cast<bool>(ranges::BidirectionalIterator<i>())

Resolves to ranges::BidirectionalIterator<iterator_type>()

See
http://en.cppreference.com/w/cpp/concept/BidirectionalIterator

concept bool seqan3::random_access_iterator_concept = bidirectional_iterator_concept<i> && totally_ordered_concept<i> && sized_sentinel_concept<i, i> && static_cast<bool>(ranges::RandomAccessIterator<i>())

Resolves to ranges::RandomAccessIterator<iterator_type>()

See
http://en.cppreference.com/w/cpp/concept/RandomAccessIterator

Range concepts

Adapted from the Ranges TS.

Container concepts

Container concepts as defined by the standard library (or very close).

Container-of-container concepts

Shortcuts for multi-dimensional container concepts.

Testing the iterator concepts.

Author
Rene Rahn <rene.rahn AT fu-berlin.de>

template <typename value_t, typename... ts>
template<>
struct value<ranges::ostream_iterator<value_t, ts...>>

Public Types

template<>
using type = value_t
namespace test_iter_concepts

Typedefs

using seqan3::detail::test_iter_concepts::input_iterator = typedef std::istream_iterator<char>

Typedef for an input_iterator.

using seqan3::detail::test_iter_concepts::output_iterator = typedef ranges::ostream_iterator<char>

Typedef for an output_iterator.

using seqan3::detail::test_iter_concepts::forward_iterator = typedef std::forward_list<char>::iterator

Typedef for an forward_iterator.

using seqan3::detail::test_iter_concepts::bidirectional_iterator = typedef std::list<char>::iterator

Typedef for an bidirectional_iterator.

using seqan3::detail::test_iter_concepts::random_access_iterator = typedef std::vector<char>::iterator

Typedef for an random_access_iterator.

using seqan3::detail::test_iter_concepts::forward_iterator_const = typedef std::forward_list<char>::const_iterator

Typedef for an const forward_iterator.

using seqan3::detail::test_iter_concepts::bidirectional_iterator_const = typedef std::list<char>::const_iterator

Typedef for an const bidirectional_iterator.

using seqan3::detail::test_iter_concepts::random_access_iterator_const = typedef std::vector<char>::const_iterator

Typedef for an const random_access_iterator.

using seqan3::detail::test_iter_concepts::value_type_t = typedef typename value<iterator_type>::type

Helper typedef for value_type for testing sized sentinel concept.

Functions

template <typename iterator_t, typename value_t>
bool operator==(iterator_t const &i, test_sentinel<value_t> const &s)

Comparison operator overload for testing sentinel concept.

template <typename iterator_t, typename value_t>
bool operator!=(iterator_t const &i, test_sentinel<value_t> const &s)

Comparison operator overload for testing sentinel concept.

template <typename value_t, typename iterator_t>
bool operator==(test_sentinel<value_t> const &s, iterator_t const &i)

Comparison operator overload for testing sentinel concept.

template <typename value_t, typename iterator_t>
bool operator!=(test_sentinel<value_t> const &s, iterator_t const &i)

Comparison operator overload for testing sentinel concept.

template <typename iterator_t>
requires random_access_iterator_concept<iterator_t> test_sized_sentinel<iterator_t>::difference_type seqan3::detail::test_iter_concepts::operator-(test_sized_sentinel < iterator_t > const & s, iterator_t const & i)

Difference operator overload for testing sized sentinel concept.

template <typename iterator_t>
requires random_access_iterator_concept<iterator_t> test_sized_sentinel<iterator_t>::difference_type seqan3::detail::test_iter_concepts::operator-(iterator_t const & i, test_sized_sentinel < iterator_t > const & s)

Difference operator overload for testing sized sentinel concept.

template <typename value_t>
struct test_sentinel
#include <core/concept/iterator_detail.hpp>

Test object for testing sentinels.

Public Types

template<>
using value_type = value_t
template<>
using difference_type = size_t

Public Members

value_type val = {}
template <typename iterator_type>
struct test_sized_sentinel
#include <core/concept/iterator_detail.hpp>

Helper struct for testing sized sentinel concept.

Inherits from seqan3::detail::test_iter_concepts::test_sentinel< value_type_t< iterator_type > >

Public Types

template<>
using difference_type = typename iterator_type::difference_type
template<>
using value_type = value_type_t<iterator_type>

Public Members

iterator_type _pos
value_type val
template <typename iterator_type>
struct value
#include <core/concept/iterator_detail.hpp>

Metafunction overload for testing sentinel concept.

Public Types

template<>
using type = typename std::iterator_traits<iterator_type>::value_type
template <typename value_t, typename... ts>
template<>
struct value<ranges::ostream_iterator<value_t, ts...>>

Public Types

template<>
using type = value_t