As IsAtLeastInputIterator helper

PiperOrigin-RevId: 850059542
Change-Id: I35bcd2cb43d3ce33fd316e89ac93e7574a7e151c
This commit is contained in:
Derek Mauro
2025-12-29 08:00:50 -08:00
committed by Copybara-Service
parent 87c547923d
commit a529ebc843
2 changed files with 7 additions and 0 deletions

View File

@@ -964,6 +964,9 @@ cc_library(
hdrs = ["internal/iterator_traits.h"],
copts = ABSL_DEFAULT_COPTS,
linkopts = ABSL_DEFAULT_LINKOPTS,
visibility = [
"//absl:__subpackages__",
],
deps = [
":config",
"//absl/meta:type_traits",

View File

@@ -60,6 +60,10 @@ template <typename IteratorTag, typename Iterator>
using IsAtLeastIterator =
std::is_convertible<IteratorConcept<Iterator>, IteratorTag>;
template <typename Iterator>
using IsAtLeastInputIterator =
IsAtLeastIterator<std::input_iterator_tag, Iterator>;
template <typename Iterator>
using IsAtLeastForwardIterator =
IsAtLeastIterator<std::forward_iterator_tag, Iterator>;