![]() |
P4C
The P4 Compiler
|
#include <assoc.h>
Public Member Functions | |
set (std::initializer_list< typename Base::value_type > init, const Compare &comp=Compare(), const Allocator &alloc=Allocator()) | |
void | swap (set &other) |
const std::set< Key, Compare, Allocator > & | unstable_iterable () const |
![]() | |
const_iterator | begin () const noexcept |
iterator | begin () noexcept |
const_iterator | cbegin () const noexcept |
bool | contains (const key_type &key) const |
const_reverse_iterator | crbegin () const noexcept |
std::pair< iterator, iterator > | equal_range (const key_type &key) |
std::pair< const iterator, const_iterator > | equal_range (const key_type &key) const |
iterator | lower_bound (const key_type &key) |
const_iterator | lower_bound (const key_type &key) const |
const_reverse_iterator | rbegin () const noexcept |
reverse_iterator | rbegin () noexcept |
const_iterator | unstable_begin () const noexcept |
iterator | unstable_begin () noexcept |
const_iterator | unstable_cbegin () const noexcept |
iterator | upper_bound (const key_type &key) |
const_iterator | upper_bound (const key_type &key) const |
Additional Inherited Members | |
![]() | |
using | allocator_type = typename Base::allocator_type |
using | const_iterator = typename Base::const_iterator |
using | const_pointer = typename Base::const_pointer |
using | const_reference = typename Base::const_reference |
using | const_reverse_iterator = typename Base::const_reverse_iterator |
using | difference_type = typename Base::difference_type |
using | iterator = typename Base::iterator |
using | key_type = typename Base::key_type |
using | pointer = typename Base::pointer |
using | reference = typename Base::reference |
using | reverse_iterator = typename Base::reverse_iterator |
using | size_type = typename Base::size_type |
using | value_type = typename Base::value_type |
![]() | |
using | hasher = typename Base::hasher |
using | key_equal = typename Base::key_equal |
![]() | |
static constexpr bool | iterable = Itble == Iterable::Yes |
![]() | |
void | _ensure_iterable () const |
Works just like a normal std::set, except it cannot be iterated over if the key is not stable (unless explicitly overridden by the last template parameter or preferably use of iterable_set or non_iterable_set).
|
inline |
Extract an iterable that can be iterated over even if this container is not iterable. This is intended for targeted use at places where it is actually safe to iterate over a container with unspecified order – i.e. in cases where the result does in no way depend on the iteration order. An example can be checking if a given value is present in the map.