kblib 0.2.3
General utilities library for modern C++
|
Provides generic operations for containers, as well as kblib::stack. More...
#include "fakestd.h"
#include "iterators.h"
#include "tdecl.h"
#include "traits.h"
#include <cstddef>
#include <deque>
#include <iterator>
#include <memory>
#include <stack>
#include <type_traits>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | kblib |
The main namespace in which all entities from kblib are defined. | |
namespace | std |
namespace | kblib::detail |
The namespace used for implementation details within kblib. | |
Functions | |
template<typename C > | |
constexpr auto | kblib::pop (C &s) -> typename C::value_type |
template<class C , typename K , typename V > | |
constexpr auto | kblib::get_or (const C &m, const K &key, const V &defval) -> typename C::mapped_type |
template<typename Map , typename Key > | |
constexpr auto | kblib::try_get (Map &map, Key &&key) -> copy_const_t< Map, typename Map::mapped_type > * |
template<typename M , typename K > | |
constexpr auto | kblib::get_check (M &&m, const K &key) noexcept(noexcept(m.find(key) !=m.end())) -> exists_t< decltype(m.find(key))> |
template<typename V > | |
auto | kblib::force_shrink_to_fit (V &vec) -> void |
std::vector::shrink_to_fit is non-binding, which means that there is no guaranteed way to shrink a vector via its API. This function is a roundabout way of doing that without relying on the sanity of the implementation (except that it assumes that a vector won't significantly over-allocate on sized construction). More... | |
template<typename Container , typename Range > | |
constexpr auto | kblib::construct_from_range (Range &&r) -> Container |
Allows for constructing a container of a specified type from a range object. Copy elision means that this does not result in any extra copies. More... | |
Variables | |
constexpr struct kblib::build_end_t | kblib::build_end |
Provides generic operations for containers, as well as kblib::stack.
Definition in file containers.h.