MySQL 9.6.0
Source Code Documentation
iterator_interface.h File Reference

Experimental API header. More...

#include <cstddef>
#include <iterator>
#include <type_traits>
#include "mysql/meta/is_pointer.h"
#include "mysql/meta/not_decayed.h"

Go to the source code of this file.

Classes

class  mysql::iterators::detail::Dereferenceable_wrapper< Value_tp >
 Auxiliary object that holds a value internally, and operator-> returns a pointer to the value. More...
 
class  mysql::iterators::Default_sentinel
 Used like std::default_sentinel_t / std::default_sentinel. More...
 
class  mysql::iterators::Iterator_interface< Self_tp >
 CRTP base class (mixin) that makes your class a standard-compliant iterator, given only a minimal set of functions to read, move and compare iterators. More...
 
struct  Not_a_legacy_iterator
 Helper type to declare that an iterator is not a legacy iterator. More...
 
struct  std::iterator_traits< Iterator_t >
 Specialization of the standard library customization point std::iterator_traits, to subclasses of Iterator_interface. More...
 
struct  std::pointer_traits< Iterator_t >
 Specialization of the standard library customization point std::pointer_traits, to subclasses of Iterator_interface which declare themselves to be contiguous iterators. More...
 
struct  std::indirectly_readable_traits< Iterator_t >
 
struct  std::incrementable_traits< Iterator_t >
 

Namespaces

namespace  mysql
 
namespace  mysql::iterators
 
namespace  mysql::iterators::detail
 
namespace  std
 Define std::hash<Gtid>.
 

Concepts

concept  mysql::iterators::detail::Has_member_get_maybe_void
 Helper: returns true if Type has a get function, regardless if it returns void or not.
 
concept  mysql::iterators::detail::Has_member_get_void
 Helper: returns true if Type has a get function that returns void (which does not make it an iterator).
 
concept  mysql::iterators::detail::Has_member_get
 true if Type has a get member that does not return void.
 
concept  mysql::iterators::detail::Has_member_get_pointer
 true if Type has a get member that returns a pointer.
 
concept  mysql::iterators::detail::Has_member_get_reference
 true if Type has a get member that returns a reference type.
 
concept  mysql::iterators::detail::Has_member_next
 true if Type has a next member.
 
concept  mysql::iterators::detail::Has_member_is_equal
 true if Type has an is_equal member.
 
concept  mysql::iterators::detail::Has_member_is_sentinel
 true if Type has an is_sentinel member.
 
concept  mysql::iterators::detail::Has_member_prev
 true if Type has a prev member
 
concept  mysql::iterators::detail::Has_member_advance
 true if Type has an advance member
 
concept  mysql::iterators::detail::Has_member_distance_from
 true if Type has a distance_from member
 
concept  mysql::iterators::detail::Has_member_distance_from_sentinel
 true if Type has a distance_from member
 
concept  mysql::iterators::detail::Has_equality_member
 true if Type has an is_equal or distance_from member.
 
concept  mysql::iterators::Is_input_iterator_impl
 True if Type has the members required for Iterator_interface<Type> to satisfy std::input_iterator.
 
concept  mysql::iterators::Is_legacy_input_iterator_impl
 True if Type has the members required for Iterator_interface<Type> to meet the syntactic requirements for LegacyInputIterator.
 
concept  mysql::iterators::Is_legacy_forward_iterator_impl
 True if Type has the members and the value type for required for Iterator_interface<Type> to meet the syntactic requirements for LegacyForwardIterator.
 
concept  mysql::iterators::Is_legacy_bidirectional_iterator_impl
 true if Type has the members required for Iterator_interface<Type> to meet the syntactic requirements for LegacyBidirectionalIterator.
 
concept  mysql::iterators::Is_legacy_random_access_iterator_impl
 true if Type has the members required for Iterator_interface<Type> to meet the syntactic requirements for LegacyRandomAccessIterator.
 
concept  mysql::iterators::Is_legacy_contiguous_iterator_impl
 true if Type has the members required for Iterator_interface<Type> to meet the syntactic requirements for LegacyContiguousIterator.
 

Functions

template<class Iterator_t >
requires std::derived_from<Iterator_t, Iterator_interface<Iterator_t>> && detail::Has_equality_member<Iterator_t>
bool mysql::iterators::operator== (const Iterator_t &a, const Iterator_t &b)
 Equality operator, which returns true if the two iterators are equal. More...
 
template<class Iterator_t >
requires std::derived_from<Iterator_t, Iterator_interface<Iterator_t>> && ( requires { Iterator_t().distance_from_sentinel(); } || requires { Iterator_t().is_sentinel(); })
bool mysql::iterators::operator== (const Iterator_t &it, const Default_sentinel &)
 Equality operator, which returns true if the iterator is equal to the sentinel. More...
 
template<class Iterator_t >
requires std::derived_from<Iterator_t, Iterator_interface<Iterator_t>> && detail::Has_member_advance<Iterator_t>
Iterator_t mysql::iterators::operator+ (std::ptrdiff_t delta, const Iterator_t &iterator)
 Addition operator with the left-hand-side of type ptrdiff_t and the right-hand-side of Iterator type, returning a new iterator that is ahead of the given iterator by the given number of steps. More...
 
template<class Iterator_t >
std::ptrdiff_t mysql::iterators::operator- (const Iterator_t &iterator, const Default_sentinel &)
 Subtraction operator with the left-hand-side of Iterator type and the right-hand-side of Sentinel type, returning the number of steps from the sentinel to the iterator (which is non-positive). More...
 
template<class Iterator_t >
std::ptrdiff_t mysql::iterators::operator- (const Default_sentinel &, const Iterator_t &iterator)
 Subtraction operator with the left-hand-side of Sentinel type and the right-hand-side of Iterator type, returning the number of steps from the iterator to the sentinel (which is non-negative). More...
 
template<class Iterator_t >
requires std::derived_from<Iterator_t, Iterator_interface<Iterator_t>> && detail::Has_member_distance_from<Iterator_t>
std::strong_ordering mysql::iterators::operator<=> (const Iterator_t &it1, const Iterator_t &it2)
 Three-way comparison operator which compares two Iterator objects and returns a std::strong_ordering object. More...
 
template<class Iterator_t >
requires std::derived_from<Iterator_t, Iterator_interface<Iterator_t>> && detail::Has_member_distance_from_sentinel<Iterator_t>
std::strong_ordering mysql::iterators::operator<=> (const Iterator_t &it1, const Default_sentinel &)
 Three-way comparison operator which compares an Iterator object and a Sentinel object and returns a std::strong_ordering object. More...
 

Variables

constexpr Default_sentinel mysql::iterators::default_sentinel
 

Detailed Description

Experimental API header.