MySQL 9.6.0
Source Code Documentation
mysql::sets::Is_metric_set_traits Concept Reference

True if Test is a "metric" Set traits class, i.e., it is bounded, and it is possible to compute differences between boundaries. More...

#include <set_traits.h>

Concept definition

template<class Test>
std::same_as<typename Test::Difference_t, typename Test::Difference_t> &&
(!std::same_as<typename Test::Difference_t, void>) &&
requires(Test t, typename Test::Element_t v1, typename Test::Element_t v2,
typename Test::Difference_t d1, typename Test::Difference_t d2) {
{ Test::sub(v1, v2) } -> std::same_as<typename Test::Difference_t>;
{ Test::add(v1, d1) } -> std::same_as<typename Test::Element_t>;
{ Test::add(d1, v1) } -> std::same_as<typename Test::Element_t>;
{ Test::add(d1, d2) } -> std::same_as<typename Test::Difference_t>;
}
True if Test is a "bounded" Set traits class.
Definition: set_traits.h:105
True if Test is a "metric" Set traits class, i.e., it is bounded, and it is possible to compute diffe...
Definition: set_traits.h:136
#define d1
Type sub(Shards< COUNT > &shards, size_t id, size_t n)
Decrement the counter for a shard by n.
Definition: ut0counter.h:280
static mysql_service_status_t add(reference_caching_channel channel, const char *implementation_name) noexcept
Definition: component.cc:127

Detailed Description

True if Test is a "metric" Set traits class, i.e., it is bounded, and it is possible to compute differences between boundaries.

This requires that it has a member type Difference_t (which may or may not be equal to Element_t), that the difference between two Element_t values is of type Difference_t and can be computed using member function sub, that two Difference_t objects can be added using add to give another Difference_t, and that a Difference_t can be added to a Element_t using add to give another Element_t.