Botan 3.4.0
Crypto and TLS for C&
Classes | Namespaces | Functions
stl_util.h File Reference

Internal Header. More...

#include <algorithm>
#include <functional>
#include <map>
#include <optional>
#include <set>
#include <span>
#include <string>
#include <tuple>
#include <variant>
#include <vector>
#include <botan/concepts.h>
#include <botan/secmem.h>
#include <botan/strong_type.h>

Go to the source code of this file.

Classes

class  Botan::BufferSlicer
 
class  Botan::BufferStuffer
 Helper class to ease in-place marshalling of concatenated fixed-length values. More...
 
struct  Botan::overloaded< Ts >
 
class  Botan::scoped_cleanup< FunT >
 Helper class to create a RAII-style cleanup callback. More...
 

Namespaces

namespace  Botan
 

Functions

template<typename... Ts>
decltype(auto) Botan::concat (Ts &&... buffers)
 
template<typename ResultT , typename... Ts>
ResultT Botan::concat_as (Ts &&... buffers)
 
template<typename GeneralVariantT , typename SpecialT >
requires (std::is_constructible_v<GeneralVariantT, std::decay_t<SpecialT>>)
constexpr GeneralVariantT Botan::generalize_to (SpecialT &&specific) noexcept
 Converts a given variant into another variant-ish whose type states are a super set of the given variant.
 
template<typename GeneralVariantT , typename... SpecialTs>
constexpr GeneralVariantT Botan::generalize_to (std::variant< SpecialTs... > specific) noexcept
 Converts a given variant into another variant-ish whose type states are a super set of the given variant.
 
template<typename... Alts, typename... Ts>
constexpr bool Botan::holds_any_of (const std::variant< Ts... > &v) noexcept
 
template<typename GeneralVariantT , typename SpecialT >
constexpr bool Botan::is_generalizable_to (const SpecialT &) noexcept
 
template<typename GeneralVariantT , typename... SpecialTs>
constexpr bool Botan::is_generalizable_to (const std::variant< SpecialTs... > &) noexcept
 
template<typename K , typename V >
std::set< K > Botan::map_keys_as_set (const std::map< K, V > &kv)
 
template<typename K , typename V >
std::set< K > Botan::map_keys_as_set (const std::multimap< K, V > &kv)
 
template<typename T , typename Pred >
void Botan::map_remove_if (Pred pred, T &assoc)
 
template<typename K , typename V >
void Botan::multimap_insert (std::multimap< K, V > &multimap, const K &key, const V &value)
 
template<class... Ts>
 Botan::overloaded (Ts...) -> overloaded< Ts... >
 
template<typename RetT , typename KeyT , typename ReducerT >
requires std::is_convertible_v<ReducerT, std::function<RetT(RetT, const KeyT&)>>
RetT Botan::reduce (const std::vector< KeyT > &keys, RetT acc, ReducerT reducer)
 
template<typename K , typename V , typename R >
Botan::search_map (const std::map< K, V > &mapping, const K &key, const R &null_result, const R &found_result)
 
template<typename K , typename V >
Botan::search_map (const std::map< K, V > &mapping, const K &key, const V &null_result=V())
 
template<concepts::contiguous_container T = std::vector<uint8_t>>
T Botan::to_byte_vector (std::string_view s)
 
std::string Botan::to_string (std::span< const uint8_t > bytes)
 
template<typename T , typename OT >
bool Botan::value_exists (const std::vector< T > &vec, const OT &val)
 

Detailed Description

Internal Header.

Definition in file stl_util.h.