koutil
Loading...
Searching...
No Matches
koutil::container::is_bucket Concept Reference

Concept to check if a type is a valid bucket type. More...

#include <template_hash_array.h>

Concept definition

template<typename Bucket, typename KeyID>
concept koutil::container::is_bucket = requires(Bucket& bucket, std::size_t v) {
{ *bucket.begin() } -> std::same_as<std::pair<std::size_t, KeyID>&>;
{ *bucket.end() } -> std::same_as<std::pair<std::size_t, KeyID>&>;
{ bucket.size() } -> std::same_as<std::size_t>;
{ bucket.emplace_back(v, v) };
{ bucket.clear() };
{ bucket.erase(bucket.begin()) };
typename Bucket::iterator;
requires std::forward_iterator<typename Bucket::iterator>;
requires std::is_same_v<typename Bucket::iterator, decltype(bucket.begin())>
&& std::is_same_v<typename Bucket::iterator, decltype(bucket.end())>;
}
Concept to check if a type is a valid bucket type.
Definition template_hash_array.h:35

Detailed Description

Concept to check if a type is a valid bucket type.

Template Parameters
BucketThe bucket type.
KeyIDThe key ID type.