Botan 3.5.0
Crypto and TLS for C&
stl_util.h File Reference

Internal Header. More...

#include <algorithm>
#include <functional>
#include <optional>
#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.


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...
class  Botan::StringLiteral< N >


namespace  Botan
namespace  Botan::detail


#define BOTAN_ASSERT_IS_SOME(v)   assert_is_some(v, #v, __func__, __FILE__, __LINE__)


template<typename T >
T Botan::assert_is_some (std::optional< T > v, const char *expr, const char *func, const char *file, int line)
template<typename OutR = detail::AutoDetect, ranges::spanable_range... Rs>
requires (all_same_v<std::ranges::range_value_t<Rs>...>)
constexpr auto Botan::concat (Rs &&... ranges)
template<ranges::spanable_range OutR, ranges::spanable_range... Rs>
requires (concepts::reservable_container<OutR> || ranges::statically_spanable_range<OutR>)
constexpr OutR Botan::detail::concatenate (Rs &&... ranges)
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 T , typename Pred >
void Botan::map_remove_if (Pred pred, T &assoc)
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<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.

Macro Definition Documentation


#define BOTAN_ASSERT_IS_SOME ( v)    assert_is_some(v, #v, __func__, __FILE__, __LINE__)

Definition at line 389 of file stl_util.h.

Referenced by Botan::AlternativeName::count(), and Botan::OID::encode_into().