BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslfmt::Streamed< t_STREAMABLE > Class Template Reference

#include <bslfmt_streamed.h>

Detailed Description

template<class t_STREAMABLE>
class bslfmt::Streamed< t_STREAMABLE >

This class provides a wrapper to enable a streamable type to be used with bsl::format (and std::format) when no formatter specialization is provided (the type is not formattable).

Note
Note that it is possible to use this wrapper with types that have a formatter, if the compiler supports it we give a compilation warning directing the user to use the existing formatter instead of wrapping to use the streaming operator.

See bslfmt_streamed

Public Member Functions

 Streamed (const t_STREAMABLE &object)
 
const t_STREAMABLE & object () const
 

Constructor & Destructor Documentation

◆ Streamed()

template<class t_STREAMABLE >
bslfmt::Streamed< t_STREAMABLE >::Streamed ( const t_STREAMABLE &  object)

Create a Streamed wrapper instance around the specified object.

Precondition
The behavior is undefined unless the lifetime of object is at least as long as that of the wrapper created.

Member Function Documentation

◆ object()

template<class t_STREAMABLE >
const t_STREAMABLE & bslfmt::Streamed< t_STREAMABLE >::object ( ) const
inline

Return a non-modifiable reference to the wrapped object.


The documentation for this class was generated from the following file: