Extracted min_category as a variadic metafunction.

The new min_category is similar to minimum_category but accepts variable
number of iterator categories on input instead of just two, and also does
not depend on Boost.MPL for lambda placeholders. The existing minimum_category
trait has been reimplemented in terms of min_category and deprecated.

We don't yet emit deprecation warnings as there is still code that uses
the old trait which we first need to update. Eventually, minimum_category
will emit warnings and will be removed.
This commit is contained in:
Andrey Semashev
2025-01-27 00:04:13 +03:00
parent b30cbf634c
commit dec7d0f24c
8 changed files with 165 additions and 45 deletions

View File

@@ -48,14 +48,14 @@ information is needed, call on `indirect_reference`.
Both of these templates are essential to the correct functioning of
[link iterator.specialized.indirect `indirect_iterator`].
[h2 `minimum_category`]
[h2 `min_category`]
`minimum_category` takes two iterator categories or two iterator traversal tags
`min_category` takes one or more iterator categories or iterator traversal tags
and returns the one that is the weakest (i.e. least advanced). For example:
static_assert(
is_same<
minimum_category<
min_category<
std::forward_iterator_tag,
std::random_access_iterator_tag
>::type,