Create and return a bslfmt::Streamed wrapper for the specified object.

Synopsis

Declared in <bslfmt_streamed.h>

template<class t_STREAMABLE>
bslfmt::Streamed<t_STREAMABLE>
streamed(t_STREAMABLE const& object)
requires (bsl::formattable<t_STREAMABLE, char>);

Description

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.

Return Value

a Streamed wrapper referring to object

Parameters

Name

Description

object

Streamable object to wrap for formatting via operator<<.

Created with MrDocs