True if Test has the properties of a "collection", i.e., a range with member functions to query size and emptiness.
More...
#include <meta.h>
template<class Test>
requires(const Test ct, Test t)
{
{ t.begin() } -> std::forward_iterator;
{ t.end() } -> std::sentinel_for<decltype(t.begin())>;
{ ct.begin() } -> std::forward_iterator;
{ ct.end() } -> std::sentinel_for<decltype(ct.begin())>;
{ ct.size() } -> std::same_as<std::size_t>;
{ ct.ssize() } -> std::same_as<std::ptrdiff_t>;
{ ct.empty() } -> std::same_as<bool>;
{ (bool)ct } -> std::same_as<bool>;
}
True if Test has the properties of a "collection", i.e., a range with member functions to query size ...
Definition: meta.h:115
True if Test has the properties of a "collection", i.e., a range with member functions to query size and emptiness.
It requires the following:
- t.begin() returns a forward iterator
- t.end() returns a sentinel for t.begin()
- t.size() returns std::size_t
- t.ssize() returns std::ptrdiff_t
- t.empty() and (bool)t return bool
In addition, the following semantic requirements must hold:
- t.size() == std::ranges::distance(t.begin(), t.end())
- t.ssize() == std::ptrdiff_t(t.size())
- t.empty() == (t.size() == 0)
- t.empty() == !(bool)t