14#ifndef ZYPP_NG_LOG_FORMAT_H_INCLUDED
15#define ZYPP_NG_LOG_FORMAT_H_INCLUDED
66 template <
typename T,
typename Enable =
void>
76 operator std::string()
const {
77 std::ostringstream ss;
90 const ContextWeakRef
ctx;
93 operator std::string()
const {
94 std::ostringstream ss;
100 auto ctxLock = v.
ctx.lock();
104 return os <<
"<<Error: Context Required for streaming " <<
typeid(T).name() <<
">>";
110 template <
typename T,
typename =
void>
113 template <
typename T>
114 struct has_view_proxy<T,
std::void_t<decltype(formatter<T>::stream(std::declval<std::ostream&>(), std::declval<const T&>()))>>
119 template <
typename T>
120 auto view(
const ContextRef& ctx,
const T& obj) {
125 template <
typename T >
136 template <
typename T>
140 return os << log::view<T>(obj);
typename enable_if< B, T >::type enable_if_t
std::ostream & operator<<(std::ostream &str, const Capabilities &obj)
relates: Capabilities Stream output
auto view(const ContextRef &ctx, const T &obj)
Unified format call: Context-Aware.
Temporary object for streaming, we prefer direct streaming so we have string allocations only when ne...
friend std::ostream & operator<<(std::ostream &os, const ctx_bound_view_proxy &v)
Detection trait for StaticFormatter implementation.
Temporary object for streaming, we prefer direct streaming so we have string allocations only when ne...
friend std::ostream & operator<<(std::ostream &os, const view_proxy &v)
#define ZYPP_FWD_DECL_TYPE_WITH_REFS(T)