userver: userver/utils/required.hpp File Reference
Loading...
Searching...
No Matches
required.hpp File Reference

Detailed Description

A wrapper that holds a value of type T and has no default constructor, forcing explicit initialization.

Definition in file required.hpp.

Go to the source code of this file.

#include <concepts>
#include <string_view>
#include <type_traits>
#include <utility>
#include <userver/compiler/impl/lifetime.hpp>

Classes

class  utils::Required< T >
 A wrapper that holds a value of type T and has no default constructor, forcing explicit initialization. More...
 

Namespaces

namespace  utils
 Utilities.
 

Functions

template<typename T>
requires requires(const T& v) { { ToStringView(v) } -> std::same_as<std::string_view>; }
std::string_view utils::ToStringView (const Required< T > &req)
 Convert Required<T> to std::string_view via ADL-found ToStringView on the inner value.