FE 0.16.1
Fast, Effecient FrontEnds
Loading...
Searching...
No Matches
container.h File Reference
#include <type_traits>
#include <utility>
#include "fe/assert.h"
Include dependency graph for container.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  fe

Concepts

concept  fe::Stacklike
 Something which behaves like std::stack or std::priority_queue.
concept  fe::Queuelike
 Something which behaves like std::queue.

Functions

Helpers for Containers
template<Stacklike S>
S::value_type fe::pop (S &s)
template<Queuelike Q>
Q::value_type fe::pop (Q &q)
auto fe::lookup (auto &container, const auto &key)
 Yields a pointer to the value mapped to key (or the value itself if it is a pointer) or nullptr if not found.
decltype(auto) fe::assert_lookup (auto &container, const auto &key)
 Looks up key in container, asserts that it exists, and returns a reference to the mapped value.
auto fe::assert_emplace (auto &container, auto &&... args)
 Invokes emplace on container, asserts that insertion actually happened, and returns the iterator.