stlab
2.4.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
Toggle main menu visibility
Loading...
Searching...
No Matches
concepts.hpp
Go to the documentation of this file.
1
#ifndef STLAB_ITERATOR_CONCEPTS_HPP
2
#define STLAB_ITERATOR_CONCEPTS_HPP
3
7
8
#define STLAB_CONCEPT(x) STLAB_PRIVATE_CONCEPT_##x
9
10
#if __cpp_has_concepts
11
12
#include <iterator>
13
14
#include <stlab/config.hpp>
15
#include <
stlab/iterator/set_next.hpp
>
16
17
namespace
stlab
{
18
STLAB_VERSION_NAMESPACE_BEGIN()
19
20
25
26
template <class I>
27
concept
forward_node_iterator
= std::forward_iterator<I> && requires(I i) {
28
{
stlab::unsafe::set_next
(i, i) };
29
};
30
32
33
STLAB_VERSION_NAMESPACE_END()
34
}
// namespace stlab
35
36
#define STLAB_PRIVATE_CONCEPT_FORWARD_NODE_ITERATOR stlab::forward_node_iterator
37
38
#else
39
40
#define STLAB_PRIVATE_CONCEPT_FORWARD_NODE_ITERATOR typename
41
42
#endif
43
44
#endif
stlab::forward_node_iterator
Definition
concepts.hpp:27
stlab::unsafe::set_next
void set_next(const I &x, const I &y)
Sets the successor of the node referenced by x to y (via set_next_fn<I>).
Definition
set_next.hpp:41
stlab
Definition
reverse.hpp:28
set_next.hpp
Intrusive forward/bidirectional iterator helpers (set_next, splice, skip).
stlab
iterator
concepts.hpp
Generated by
1.18.0