[#BloombergLP-bslfmt-basic_format_arg-05] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslfmt.adoc[bslfmt]::xref:BloombergLP/bslfmt/basic_format_arg-0d.adoc[basic_format_arg]<xref:BloombergLP/bslfmt/basic_format_context.adoc[basic_format_context<t_OUT, t_CHAR>]> :relfileprefix: ../../ :mrdocs: This class provides an STL‐compliant `basic_format_arg` which holds (by value for scalar and pointer types, by reference for user‐defined types). These types should not be constructed directly by the user. == Synopsis Declared in `<bslfmt_format_arg.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class t_OUT, class t_CHAR> class xref:BloombergLP/bslfmt/basic_format_arg-0d.adoc[basic_format_arg]<xref:BloombergLP/bslfmt/basic_format_context.adoc[basic_format_context<t_OUT, t_CHAR>]>; ---- == Types [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslfmt/basic_format_arg-05/handle.adoc[`handle`] | This class provides a type‐erased wrapper which holds a pointer to a user‐defined type and permits its formatting using the appropriate bsl::formatter type. |=== == Type Aliases [cols="1"] |=== | Name | xref:BloombergLP/bslfmt/basic_format_arg-05/BoolType.adoc[`BoolType`] | xref:BloombergLP/bslfmt/basic_format_arg-05/UnspecifiedBoolType.adoc[`UnspecifiedBoolType`] |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/bslfmt/basic_format_arg-05/2constructor.adoc[`basic_format_arg`] [.small]#[constructor]# | Create a `basic_format_arg` which holds a `bsl::monostate`. | xref:BloombergLP/bslfmt/basic_format_arg-05/visit.adoc[`visit`] | Invoke the specified `visitor` functor on the value contained by this object, providing that functor non‐modifiable access to that value. `visitor` must be a `variant`‐style functor that is able to visit all supported types listed in the {DESCRIPTION}. | xref:BloombergLP/bslfmt/basic_format_arg-05/2conversion.adoc[`operator BoolType`] | Return whether this object holds a value. |=== == Friends [cols="1,4"] |=== | Name| Description | `xref:BloombergLP/bslfmt/swap.adoc[BloombergLP::bslfmt::swap]` | Exchange the values of the specified `lhs` and `rhs`. | `xref:BloombergLP/bslfmt/Format_ArgUtil.adoc[BloombergLP::bslfmt::Format_ArgUtil]` | This class provides utility functions to enable manipulation of types declared by this component. It is solely for private use by other components of the `bslfmt` package and should not be used directly. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#