streamed overloads
Synopses
Declared in <bslfmt_streamed.h>
Create and return a Streamed wrapper for the specified object when t_STREAMABLE2 is not formattable.
Streamed<t_STREAMABLE2>
streamed(t_STREAMABLE2 const& object)
requires (!bsl::formattable<t_STREAMABLE2, char>);
Create and return a Streamed wrapper for the specified object when t_STREAMABLE2 is already formattable (emits a deprecation warning).
Streamed<t_STREAMABLE2>
streamed(t_STREAMABLE2 const& object)
requires (bsl::formattable<t_STREAMABLE2, char>);
Create and return a bslfmt::Streamed (wrapper) object for the specified streamable object. The behavior is undefined unless t_STREAMABLE has a standard and well‐behaved std::ostream output operator. This wrapper‐creator free function to support compilation with no CTAD (Class Template Argument Deduction); see (#Usage). Notice that for compilations that support the bsl::formattable trait we define two concept‐driven overloads of this function, one of which will warn the user (compiler warning) if a bsl::formatter already exists for the type they try to streamed‐wrap.
template<class t_STREAMABLE>
bslfmt::Streamed<t_STREAMABLE>
streamed(t_STREAMABLE const& object)
requires (bsl::formattable<t_STREAMABLE, char>);
Parameters
Name |
Description |
object |
Streamable object to wrap for formatting via |
Created with MrDocs