Strong typedef for a type T. More...
#include <functional>
#include <iosfwd>
#include <type_traits>
#include <utility>
#include <fmt/format.h>
#include <userver/utils/fmt_compat.hpp>
#include <boost/functional/hash_fwd.hpp>
#include <userver/formats/common/meta.hpp>
#include <userver/utils/meta.hpp>
#include <userver/utils/underlying_value.hpp>
#include <userver/utils/void_t.hpp>
Go to the source code of this file.
Classes | |
class | utils::StrongTypedef< Tag, T, Ops, class > |
Strong typedef for a type T. More... | |
struct | std::hash<::utils::StrongTypedef< Tag, T, Ops > > |
struct | fmt::formatter< T, Char, std::enable_if_t<::utils::IsStrongTypedef< T >{}> > |
Namespaces | |
namespace | logging |
Logging macro and utilities. | |
namespace | utils |
Utilities. | |
Macros | |
#define | UTILS_STRONG_TYPEDEF_REL_OP(OPERATOR) |
Typedefs | |
template<class Tag , class T > | |
using | utils::NonLoggable = StrongTypedef< Tag, T, StrongTypedefOps::kCompareStrong|StrongTypedefOps::kNonLoggable > |
Enumerations | |
enum class | utils::StrongTypedefOps { kNoCompare = 0 , utils::kCompareStrong = 1 , utils::kCompareTransparentOnly = 2 , utils::kCompareTransparent = 3 , utils::kNonLoggable = 4 } |
Functions | |
constexpr bool | utils::operator& (StrongTypedefOps op, StrongTypedefOps mask) noexcept |
constexpr auto | utils::operator| (StrongTypedefOps op1, StrongTypedefOps op2) noexcept |
template<class Tag , class T , StrongTypedefOps Ops> | |
std::ostream & | utils::operator<< (std::ostream &os, const StrongTypedef< Tag, T, Ops > &v) |
Ostreams and Logging. More... | |
template<class Tag , class T , StrongTypedefOps Ops> | |
logging::LogHelper & | utils::operator<< (logging::LogHelper &os, const StrongTypedef< Tag, T, Ops > &v) |
template<class Tag , class T , StrongTypedefOps Ops> | |
constexpr decltype(auto) | utils::UnderlyingValue (const StrongTypedef< Tag, T, Ops > &v) noexcept |
template<class Tag , class T , StrongTypedefOps Ops> | |
constexpr T | utils::UnderlyingValue (StrongTypedef< Tag, T, Ops > &&v) noexcept |
constexpr bool | utils::IsStrongTypedefLoggable (StrongTypedefOps Ops) |
template<typename Tag , typename T , StrongTypedefOps Ops, typename Enable , typename ValueType > | |
std::enable_if_t< formats::common::kIsFormatValue< ValueType >, StrongTypedef< Tag, T, Ops, Enable > > | utils::Parse (const ValueType &source, formats::parse::To< StrongTypedef< Tag, T, Ops, Enable > >) |
template<typename Tag , typename T , StrongTypedefOps Ops, typename Enable , typename TargetType > | |
TargetType | utils::Serialize (const StrongTypedef< Tag, T, Ops, Enable > &object, formats::serialize::To< TargetType >) |
template<typename Tag , typename T , StrongTypedefOps Ops, typename Enable , typename StringBuilder > | |
void | utils::WriteToStream (const StrongTypedef< Tag, T, Ops, Enable > &object, StringBuilder &sw) |
template<typename Tag , StrongTypedefOps Ops> | |
std::string | utils::ToString (const StrongTypedef< Tag, std::string, Ops > &object) |
template<typename Tag , typename T , StrongTypedefOps Ops, typename = std::enable_if_t<meta::kIsInteger<T>>> | |
std::string | utils::ToString (const StrongTypedef< Tag, T, Ops > &object) |
template<typename Target , typename Tag , typename T , StrongTypedefOps Ops, typename Enable > | |
constexpr Target | utils::StrongCast (const StrongTypedef< Tag, T, Ops, Enable > &src) |
template<typename Target , typename Tag , typename T , StrongTypedefOps Ops, typename Enable > | |
constexpr Target | utils::StrongCast (StrongTypedef< Tag, T, Ops, Enable > &&src) |
template<class Tag , class T , StrongTypedefOps Ops> | |
std::size_t | utils::hash_value (const StrongTypedef< Tag, T, Ops > &v) |
Strong typedef for a type T.
Definition in file strong_typedef.hpp.
#define UTILS_STRONG_TYPEDEF_REL_OP | ( | OPERATOR | ) |
Definition at line 263 of file strong_typedef.hpp.