userver: userver/utils Directory Reference
Loading...
Searching...
No Matches
utils Directory Reference

Directories

 
datetime
 
encoding
 
statistics

Files

 
aimd_limiter.hpp
 Thread safe AIMD (Additive Increase Multiplicative Decrease) limiter.
 
algo.hpp
 Small useful algorithms.
 
any_movable.hpp
 Replacement for std::any that is not copyable. It allows you to store non-copyable and even non-movable types.
 
any_storage.hpp
 map-like heterogeneous data storage
 
assert.hpp
 Assertion macros UASSERT, UASSERT_MSG, UINVARIANT and AbortWithStacktrace() function.
 
atomic.hpp
 Helper algorithms to work with atomics.
 
boost_filesystem_file_status.hpp
 Lightweight include of Boost.Filesystem file_status.
 
boost_uuid4.hpp
 Generates UUIDv4.
 
boost_uuid5.hpp
 
 
boost_uuid7.hpp
 Generates UUIDv7.
 
box.hpp
 Remote storage for a single item. Implemented as a unique pointer that is never null, except when moved from.
 
bytes_per_second.hpp
 Data type that represents bytes per second unit.
 
cached_hash.hpp
 Holds the key and its hash for faster comparisons and hashing.
 
checked_pointer.hpp
 Utility template for returning a pointer to an object that is owned by someone else; throws std::runtime_error if nullptr is stored.
 
constexpr_indices.hpp
 Functions for iterating over a constexpr range of integers.
 
datetime_light.hpp
 Date and Time related converters.
 
debugging.hpp
 Utility for runtime debugger detection.
 
default_dict.hpp
 Dictionary with special value for missing keys.
 
distances.hpp
 Distances between strings and nearest string suggestions.
 
enumerate.hpp
 Implementation of python-style enumerate function for range-for loops.
 
exception.hpp
 Logs error_message and throws an exception ith that message.
 
expected.hpp
 For holding a value or an error.
 
fast_pimpl.hpp
 Implements pimpl idiom without dynamic memory allocation.
 
fast_scope_guard.hpp
 a helper class to perform actions on scope exit
 
filter_bloom.hpp
 Space-efficient probabilistic data structure.
 
fixed_array.hpp
 A fixed-size array with the size determined at runtime.
 
flags.hpp
 Types that provide flags interface to enums.
 
fmt_compat.hpp
 Compatibility shims for different {fmt} library versions.
 
forward_like.hpp
 
from_string.hpp
 Extract the number contained in the string. No space characters or other extra characters allowed. Supported types:
 
function_ref.hpp
 A backport of std::function_ref from C++26.
 
get_if.hpp
 Dereferences a chain of indirections and compositions, returns nullptr if one of the chain elements is not set.
 
invariant_error.hpp
 Exception that is thrown on UINVARIANT violation.
 
iovec_advance.hpp
 Helpers for advancing iovec buffers used in scatter/gather I/O (readv/writev).
 
ip.hpp
 IPv4 and IPv6 addresses and networks.
 
lazy_prvalue.hpp
 Can be used with various emplace functions to allow in-place constructing a non-movable value using a callable.
 
macaddr.hpp
 MAC address types.
 
make_intrusive_ptr.hpp
 Factory function for boost::intrusive_ptr, like std::make_unique.
 
meta.hpp
 Metaprogramming, template variables and concepts.
 
meta_light.hpp
 Lightweight concepts.
 
mock_now.hpp
 Mocking and getting mocked time values.
 
move_only_function.hpp
 A backport of std::move_only_function from C++23.
 
not_null.hpp
 Restricts a pointer or smart pointer to only hold non-null values.
 
numeric_cast.hpp
 
 
optional_ref.hpp
 Class that behaves as a nullable reference. Main difference from the pointer - value comparison of pointed values.
 
optionals.hpp
 Helper functions for std optionals.
 
overloaded.hpp
 Utility to define std::variant visitors in a simple way.
 
projected_set.hpp
 A std::unordered_set that compares its elements (of type Value) based on their Projection. It allows you to create, essentially, an equivalent of std::unordered_map where keys are stored inside values.
 
rand.hpp
 Random number generators.
 
regex.hpp
 A drop-in replacement for std::regex without huge includes and with better performance characteristics.
 
required.hpp
 A wrapper that holds a value of type T and has no default constructor, forcing explicit initialization.
 
resources.hpp
 Functions to embed and retrieve blobs from binary.
 
result_store.hpp
 
 
scope_guard.hpp
 a helper class to perform actions on scope exit
 
shared_readable_ptr.hpp
 std::shared_ptr<const T> wrapper that makes sure that the pointer is stored before dereferencing. Protects from dangling references.
 
sliding_interval.hpp
 Sliding interval of values that provides functions to compute average, min and max values from the last window_size values of interval.
 
slot_map.hpp
 A minimalistic slot-map container adaptor.
 
small_string.hpp
 An alternative to std::string with a custom SSO (small string optimization) container size. Unlike std::string, SmallString is not null-terminated thus it has no c_str(), data() returns a not null-terminated buffer.
 
small_string_fwd.hpp
 Forward declaration for stack-friendly SmallString.
 
small_string_serialization.hpp
 Parse, serialize, and fmt formatting for SmallString.
 
span.hpp
 A polyfill for std::span with some of the newer features enabled.
 
str_icase.hpp
 Case insensitive ASCII comparators and hashers.
 
str_icase_containers.hpp
 Contains utilities for working with containers with utils::StrCaseHash and utils::StrIcaseHash.
 
strerror.hpp
 MT-safe version of POSIX functions ::strerror and ::strsignal.
 
string_literal.hpp
 Non-empty string view to a compile time known null terminated char array that lives for the lifetime of program, as per [lex.string]; a drop-in replacement for static const std::string kVar = "value" and constexpr std::string_view kVar = "value".
 
string_to_duration.hpp
 Converts strings like "10s", "5d", "1h" to durations.
 
strong_typedef.hpp
 Strong typedef for a type T.
 
strong_typedef_fwd.hpp
 Forward declarations and options for StrongTypedef.
 
struct_subsets.hpp
 Utilities for creating a struct with a subset of fields of the original struct, with conversions between them.
 
swappingsmart.hpp
 Deprecated RCU-like shared_ptr cell with swap-based updates for readers.
 
text_light.hpp
 Text utilities that do not use locales.
 
thread_name.hpp
 Functions for thread name manipulation.
 
threads.hpp
 Functions to work with OS threads.
 
time_of_day.hpp
 A simple implementation of a "time since midnight" datatype.
 
token_bucket.hpp
 
 
traceful_exception.hpp
 Exception that remembers the backtrace at the point of its construction.
 
trivial_map.hpp
 Bidirectional map|sets over string literals or other trivial types.
 
trivial_map_fwd.hpp
 Forward declarations of utils::TrivialBiMap and utils::TrivialSet types.
 
underlying_value.hpp
 
 
uuid4.hpp
 Generate a UUIDv4 string.
 
uuid7.hpp
 Generate a UUIDv7 string.
 
zstring_view.hpp
 Non-empty string view type that guarantees null-termination and has a c_str() member function.