P4C
The P4 Compiler
|
#include <assoc.h>
Public Types | |
using | mapped_type = typename Base::mapped_type |
Public Member Functions | |
map (std::initializer_list< typename Base::value_type > init, const Compare &comp=Compare(), const Allocator &alloc=Allocator()) | |
void | swap (map &other) |
const std::map< Key, T, Compare, Allocator > & | unstable_iterable () const |
Works just like a normal std::map, 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_map or non_iterable_map).
|
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.