aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/containers/flat_hash/lib/concepts/iterator.h
blob: b9c1c24c8275625ae9bc911b11948a209d439e02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once

#include <iterator>

/* Concepts:
 * Iterator
 */
namespace NFlatHash::NConcepts {

template <class T, class = void>
struct Iterator : std::false_type {};

template <class T>
struct Iterator<T, std::void_t<typename std::iterator_traits<T>::iterator_category>>
    : std::true_type {};

template <class T>
constexpr bool IteratorV = Iterator<T>::value;

}  // namespace NFlatHash::NConcepts