24#ifndef MYSQL_SETS_INTERVAL_CONTAINER_H
25#define MYSQL_SETS_INTERVAL_CONTAINER_H
46template <Is_boundary_container Boundary_container_tp>
49 Boundary_container_tp> {
59 using Allocator_t =
typename Boundary_container_t::Allocator_t;
72 std::declval<Boundary_container_t>().insert(std::declval<Element_t>()));
76 Boundary_container_t::has_fast_insertion;
170 template <Is_
interval_set_over_traits_unqualified<Set_traits_t> Source_t>
325 std::forward<Interval_set_t>(interval_set).
boundaries()))
392 std::forward<Interval_set_t>(interval_set).
boundaries()))
433 std::forward<Interval_set_t>(interval_set).
boundaries()))
#define DEDUCED_NOEXCEPT_FUNCTION(X)
Helper macro to define a function that returns the result of a single expression, and has a condition...
Definition: call_and_catch.h:151
Polymorphism-free memory resource class with custom allocator and deallocator functions.
Definition: memory_resource.h:88
CRTP base class to provide members of a collection based on an implementation that provides begin/end...
Definition: collection_interface.h:90
const auto & source() const
Definition: disjoint_pairs.h:274
Container for intervals.
Definition: interval_container.h:49
const auto & boundaries() const &noexcept
Return a const lvalue reference to the underlying boundary container.
Definition: interval_container.h:196
auto inplace_union(Interval_set_t &&interval_set)
In-place insert the intervals of the given set into this container (inplace union).
auto assign(Source_t &&source)
Overwrite this object with source (copy-assigned).
static constexpr bool noexcept_insertions
Definition: interval_container.h:71
Interval_container(const Is_interval_set_over_traits< Set_traits_t > auto &source)
Construct by copying any other Interval_set over the same boundary traits.
Definition: interval_container.h:124
decltype(auto) get_memory_resource() const noexcept
Return the Memory_resource object that manages memory in this object, or a default-constructed Memory...
Definition: interval_container.h:181
typename Boundary_container_t::Allocator_t Allocator_t
Definition: interval_container.h:59
auto insert(const Element_t &element)
Insert the given element (inplace union).
auto inplace_subtract(Interval_set_t &&interval_set)
In-place subtract intervals of the given set from this container.
Storage_or_void< Boundary_container_t > Storage_t
Definition: interval_container.h:66
auto inplace_subtract(const Interval_t &interval)
Subtract the given interval.
Boundary_container_t m_boundaries
Definition: interval_container.h:437
Interval_container(const Is_interval_set_over_traits< Set_traits_t > auto &source, const Memory_resource_t &memory_resource)
Construct by copying any other Interval_set over the same boundary traits.
Definition: interval_container.h:139
auto remove(const Element_t &element)
Remove the given element (inplace subtraction).
auto & boundaries() &noexcept
Return an lvalue reference to the underlying boundary container.
Definition: interval_container.h:193
void inplace_intersect(const Interval_t &interval) noexcept
In-place intersect this container with the given interval.
Definition: interval_container.h:405
auto inplace_subtract(Boundary_iterator_t &cursor, const Interval_t &interval)
Subtract the given interval, reading and updating the given cursor.
auto && boundaries() &&noexcept
Return an rvalue reference to the underlying boundary container.
Definition: interval_container.h:203
void clear() noexcept
Make this container empty.
Definition: interval_container.h:188
Interval_container() noexcept=default
Default constructor.
auto inplace_union(const Interval_t &interval)
Insert the given interval (inplace union).
static constexpr bool has_fast_insertion
Definition: interval_container.h:75
Boundary_container_tp Boundary_container_t
Definition: interval_container.h:51
auto inplace_intersect(Interval_set_t &&interval_set)
In-place intersect this container with the given set.
typename Boundary_container_t::Iterator_t Boundary_iterator_t
Definition: interval_container.h:64
Interval_container & operator=(const Is_interval_set_over_traits< Set_traits_t > auto &source)
Assign from any other Boundary_set over the same Set traits.
Definition: interval_container.h:152
auto inplace_union(Boundary_iterator_t &cursor, const Interval_t &interval)
Insert the given interval (inplace union), reading and updating the given cursor.
CRTP base class used to define an Interval set based on an implementation having the member function ...
Definition: interval_set_interface.h:87
Boundary_set_t::Set_traits_t Set_traits_t
Definition: interval_set_interface.h:95
mysql::ranges::Disjoint_pairs_iterator< Boundary_const_iterator_t, Make_interval_t > Const_iterator_t
Definition: interval_set_interface.h:107
mysql::ranges::Disjoint_pairs_iterator< Boundary_iterator_t, Make_interval_t > Iterator_t
Definition: interval_set_interface.h:104
typename Set_traits_t::Element_t Element_t
Definition: interval_set_interface.h:96
Holds the start boundary and endpoint boundary of an interval.
Definition: interval.h:178
Definition: interval_set_meta.h:97
Definition: interval_set_meta.h:90
Class that wraps resources in a polymorphic manner.
static int interval
Definition: mysqladmin.cc:72
decltype(auto) get_memory_resource_or_default(const auto &object)
Return object.get_memory_resource(), if that function exists.
Definition: memory_resource.h:145
Definition: gtid_set.h:183
detail::Storage_or_void_helper< Container_t >::Type Storage_or_void
Type alias for Container_t::Storage_t if that exists, or void otherwise.
Definition: boundary_set_meta.h:378
noexcept
The return type for any call_and_catch(f, args...) call where f(args...) returns Type.
Definition: call_and_catch.h:76
Definition: instrumented_condition_variable.h:32