24#ifndef MYSQL_SETS_OPTIONAL_VIEW_SOURCE_SET_H
25#define MYSQL_SETS_OPTIONAL_VIEW_SOURCE_SET_H
46template <Is_set Source_tp>
54 template <
class... Args_t>
57 :
Base_t(
std::forward<Args_t>(args)...) {}
69 template <
class... Args_t>
70 [[nodiscard]]
auto find(Args_t &&...args)
const {
72 return (*this)->find(std::forward<Args_t>(args)...);
77 template <
class... Args_t>
80 return (*this)->lower_bound(std::forward<Args_t>(args)...);
85 template <
class... Args_t>
88 return (*this)->upper_bound(std::forward<Args_t>(args)...);
std::optional-like wrapper around an object that is the source for a view: this may hold an object or...
Definition: view_sources.h:200
static auto null_iterator()
Definition: view_sources.h:279
bool has_object() const
Return true if this object holds a source.
Definition: view_sources.h:229
Used to represent an optional source of a view, when that source is a set.
Definition: optional_view_source_set.h:48
auto upper_bound(Args_t &&...args) const
If the source is present, invoke upper_bound on it.
Definition: optional_view_source_set.h:86
~Optional_view_source_set()=default
Optional_view_source_set< Source_tp > This_t
Definition: optional_view_source_set.h:50
Optional_view_source_set(Optional_view_source_set &&)=default
auto lower_bound(Args_t &&...args) const
If the source is present, invoke lower_bound on it.
Definition: optional_view_source_set.h:78
auto find(Args_t &&...args) const
If the source is present, invoke find on it.
Definition: optional_view_source_set.h:70
Optional_view_source_set & operator=(Optional_view_source_set &&)=default
Optional_view_source_set(Args_t &&...args)
Delegate construction to Optional_view_source.
Definition: optional_view_source_set.h:56
Optional_view_source_set(const Optional_view_source_set &)=default
Default rule-of-5.
Optional_view_source_set & operator=(const Optional_view_source_set &)=default
Definition: gtid_set.h:183
Define std::hash<Gtid>.
Definition: gtid.h:355