[#BloombergLP-bslfmt]
= xref:BloombergLP.adoc[BloombergLP]::bslfmt
:relfileprefix: ../
:mrdocs:

Bloomberg formatting library namespace&period;

== Types

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslfmt/EnableStreamedFormatter.adoc[`EnableStreamedFormatter`] 
| A nested&hyphen;trait&hyphen;declaration compatible boolean trait indicating whether a type that is passed to `bsl&colon;&colon;format` will be formatted using its `ostream` insertion operator, `operator&lt;&lt;`&period;
| xref:BloombergLP/bslfmt/FormatSpecificationParser.adoc[`FormatSpecificationParser`] 
| A general mechanism used in format specification parsers&period; It supports parsing syntaxes of the form `fill&hyphen;and&hyphen;align?sign &num; 0 width?precision?L` and any syntax that contains a subset of the sections therein&period;
| xref:BloombergLP/bslfmt/FormatSpecificationParserEnums.adoc[`FormatSpecificationParserEnums`] 
| Namespace struct holding enums used for parsing&period;
| xref:BloombergLP/bslfmt/Format_ArgUtil.adoc[`Format&lowbar;ArgUtil`] 
| This class provides utility functions to enable manipulation of types declared by this component&period; It is solely for private use by other components of the `bslfmt` package and should not be used directly&period;
| xref:BloombergLP/bslfmt/Format_ArgsStore.adoc[`Format&lowbar;ArgsStore`] 
| This component&hyphen;private type holds an array of `basic&lowbar;format&lowbar;arg` objects and is intended to be implicitly convertible to `basic&lowbar;format&lowbar;args`&period; Note that this type has reference semantics and users must ensure that this type does not outlive the arguments used in its construction&period;
| xref:BloombergLP/bslfmt/Format_ArgsUtil.adoc[`Format&lowbar;ArgsUtil`] 
| This class provides utility functions to enable manipulation of types declared by this component&period; It is solely for private use by other components of the `bslfmt` package and should not be used directly&period;
| xref:BloombergLP/bslfmt/Format_ContextFactory.adoc[`Format&lowbar;ContextFactory`] 
| This class provides utility functions to enable manipulation of types declared by this component&period; It is solely for private use by other components of the `bslfmt` package and should not be used directly&period;
| xref:BloombergLP/bslfmt/Format_ContextOutputIteratorBase.adoc[`Format&lowbar;ContextOutputIteratorBase`] 
| This component&hyphen;private type is an abstract base required to type&hyphen;erase output iterators as required by the `format&lowbar;context` and `wformat&lowbar;context` typedefs&period;
| xref:BloombergLP/bslfmt/Format_ContextOutputIteratorImpl.adoc[`Format&lowbar;ContextOutputIteratorImpl`] 
| This type holds a reference to an iterator, and is used to type&hyphen;erase output iterators as required by the `format&lowbar;context` and `wformat&lowbar;context` typedefs&period; It is solely for private use by other components of the `bslfmt` package and should not be used directly&period;
| xref:BloombergLP/bslfmt/Format_ContextOutputIteratorRef.adoc[`Format&lowbar;ContextOutputIteratorRef`] 
| This class provides a type&hyphen;erased interface to an output iterator that it holds indirectly via a reference to a `Format&lowbar;ContextOutputIteratorImpl` type&period; It is solely for private use by other components of the `bslfmt` package and should not be used directly&period;
| xref:BloombergLP/bslfmt/Format_String_TestUpdater.adoc[`Format&lowbar;String&lowbar;TestUpdater`] 
| This is a component&hyphen;private type which enables test drivers to work around the compile&hyphen;time restrictions in `basic&lowbar;format&lowbar;string` construction&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdBasicString-07.adoc[`FormatterBase&lowbar;IsStdBasicString`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;basic&lowbar;string`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdBasicStringView-09.adoc[`FormatterBase&lowbar;IsStdBasicStringView`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;basic&lowbar;string&lowbar;view`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoCpp20FormattableType.adoc[`FormatterBase&lowbar;IsStdChronoCpp20FormattableType`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of any of the C&plus;&plus;20 standard formattable `std&colon;&colon;chrono` types&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoDuration-07.adoc[`FormatterBase&lowbar;IsStdChronoDuration`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;duration`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoFileTime-08.adoc[`FormatterBase&lowbar;IsStdChronoFileTime`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;file&lowbar;time`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoGpsTime-0c.adoc[`FormatterBase&lowbar;IsStdChronoGpsTime`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;gps&lowbar;time`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoHhMmSs-01.adoc[`FormatterBase&lowbar;IsStdChronoHhMmSs`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;hh&lowbar;mm&lowbar;ss`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoLocalTime-07.adoc[`FormatterBase&lowbar;IsStdChronoLocalTime`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;local&lowbar;time`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoPointInTimeType.adoc[`FormatterBase&lowbar;IsStdChronoPointInTimeType`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of any of the `std&colon;&colon;chrono` types that deal with points in time&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoSysTime-0d.adoc[`FormatterBase&lowbar;IsStdChronoSysTime`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;sys&lowbar;time`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoTaiTime-014.adoc[`FormatterBase&lowbar;IsStdChronoTaiTime`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;tai&lowbar;time`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoTimeType.adoc[`FormatterBase&lowbar;IsStdChronoTimeType`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of any of `std&colon;&colon;chrono&colon;&colon;&ast;&lowbar;time`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoUtcTime-0a7.adoc[`FormatterBase&lowbar;IsStdChronoUtcTime`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;utc&lowbar;time`&period;
| xref:BloombergLP/bslfmt/FormatterBase_IsStdChronoZonedTime-034.adoc[`FormatterBase&lowbar;IsStdChronoZonedTime`] 
| Simple trait type that tells is `t&lowbar;TYPE` is an instance of `std&colon;&colon;chrono&colon;&colon;zoned&lowbar;time`&period;
| xref:BloombergLP/bslfmt/FormatterCharUtil-059.adoc[`FormatterCharUtil`] 
| This struct provides a namespace for a utility functions that convert characters (e&period;g&period; `char` to `wchar&lowbar;t` or lowercase characters to uppercase)&period; Notice that this structure has specializations only for `char` and `wchar&lowbar;t` types&period;
| xref:BloombergLP/bslfmt/FormatterCharacter_CharacterOutput-0a.adoc[`FormatterCharacter&lowbar;CharacterOutput`] 
| This struct provides a function that outputs the specified `value` to the specified `out`&period;
| xref:BloombergLP/bslfmt/FormatterCharacter_MakeUnsigned-07.adoc[`FormatterCharacter&lowbar;MakeUnsigned`] 
| This `struct` template implements the `make&lowbar;unsigned` meta&hyphen;function defined in the C&plus;&plus;11 standard &lsqb;meta&period;trans&period;sign&rsqb;, providing an alias, `type`, that returns the result&period; The `type` is the unsigned analogue of the (template parameter) `t&lowbar;TYPE`&period;
| xref:BloombergLP/bslfmt/FormatterFloating_Base.adoc[`FormatterFloating&lowbar;Base`] 
| This class template provides the implementation for all possible floating point formatting styles and the parsing of the format specification&period; The specified `t&lowbar;VALUE` template type argument determines the type of floating point value use, while the specified `t&lowbar;CHAR` determines the output&apos;s character type&period; The behavior is undefined unless `t&lowbar;VALUE` is one of `float` or `double`, and `t&lowbar;CHAR` is on of `char` or `wchar&lowbar;t`&period;
| xref:BloombergLP/bslfmt/FormatterIntegralBase.adoc[`FormatterIntegralBase`] 
| This struct is a base class for `bsl&colon;&colon;formatter` specializations for integer types as well as for other types that can be represented as integer (i&period;e&period; `bool`, character and pointer types)&period; This is a private class and should not be used directly&period; The formatting of variables of a certain type is performed using the corresponding classes inherited from this one&period; Accordingly, the auxiliary functions used are declared protected&period;
| xref:BloombergLP/bslfmt/FormatterIntegral_Category-0c.adoc[`FormatterIntegral&lowbar;Category`] 
| This struct provides a function that returns a category of the formatter in accordance with the (template parameter) `t&lowbar;VALUE&lowbar;TYPE`&period;
| xref:BloombergLP/bslfmt/FormatterPointer_Nullptr.adoc[`FormatterPointer&lowbar;Nullptr`] 
| This struct is a specialization of the `bsl&colon;&colon;formatter` template for the `bsl&colon;&colon;nullptr&lowbar;t`&period;
| xref:BloombergLP/bslfmt/FormatterSpecificationNumericValue.adoc[`FormatterSpecificationNumericValue`] 
| Type holding a category plus an optional integral value&period; This is a value semantic type primarily used to represent width and precision of a format specification&period;
| xref:BloombergLP/bslfmt/FormatterSpecificationNumericValue_ArgVisitor.adoc[`FormatterSpecificationNumericValue&lowbar;ArgVisitor`] 
| Component&hyphen;private type to enable extraction of values held by format contexts during the postprocessing stage of determining the format specification (typically performed by the `FormatSpecificationParser`)&period; This type exists so that `FormatSpecificationParser` can update FormatterSpecificationNumericValue to the value contained by a Standard `basic&lowbar;format&lowbar;arg` using the Standard `visit&lowbar;format&lowbar;arg` function&period;
| xref:BloombergLP/bslfmt/FormatterString_GraphemeCluster.adoc[`FormatterString&lowbar;GraphemeCluster`] 
| &lsqb;*PRIVATE*&rsqb;This private implementation `class` characterizes a grapheme cluster represented by a set of integral values&period; This class is private to this component and should not be used by clients&period;
| xref:BloombergLP/bslfmt/FormatterTestUtil-00.adoc[`FormatterTestUtil`] 
| This struct provides a namespace for test functions that verify the correctness of formatting performed by `bslfmt` tools&period; Due to the limitations of template argument deduction, it is necessary to explicitly specialize the `FormatterTestUtil` template for `char` and `wchar&lowbar;t`&period;
| xref:BloombergLP/bslfmt/FormatterTestUtil_Oracle-0ff.adoc[`FormatterTestUtil&lowbar;Oracle`] 
| This template struct provides a namespace for a utility function that creates a string containing the result of formatting done by standard implementations&period; This struct is meant for test purposes only&period;
| xref:BloombergLP/bslfmt/FormatterUnicodeData.adoc[`FormatterUnicodeData`] 
| &lsqb;*PRIVATE*&rsqb;This private implementation `struct` contains data for correct processing of Unicode characters&period; These data are private to this package and should not be used by clients&period;
| xref:BloombergLP/bslfmt/MockFormatContext.adoc[`MockFormatContext`] 
| This unconstrained (value&hyphen;semantic) class provides an access to the current state of the format operation and is used for testing `bsl&colon;&colon;formatter` specializations&period;
| xref:BloombergLP/bslfmt/MockFormatContext_Iterator.adoc[`MockFormatContext&lowbar;Iterator`] 
| This class template provides an output iterator to the `MockFormatContext` output buffer allowing appending formatted data&period;
| xref:BloombergLP/bslfmt/MockParseContext.adoc[`MockParseContext`] 
| This class template provides an access to the format specification current parsing state&period;
| xref:BloombergLP/bslfmt/PadUtil.adoc[`PadUtil`] 
| This `struct` serves as a namespace for static functions related to padding output by bslfmt&period;
| xref:BloombergLP/bslfmt/StandardFormatSpecification.adoc[`StandardFormatSpecification`] 
| A general mechanism to parse and validate a Standard format specification string for a given argument type&period;
| xref:BloombergLP/bslfmt/Streamed-0f9.adoc[`Streamed`] 
| This class provides a wrapper to enable a streamable type to be used with `bsl&colon;&colon;format` (and `std&colon;&colon;format`) when no formatter specialization is provided (the type is not formattable)&period; 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&period;
| xref:BloombergLP/bslfmt/StreamedFormatter.adoc[`StreamedFormatter`] 
| This class provides the implementations of `parse` and `format` for formatters that format a type using its streaming operator&period;
| xref:BloombergLP/bslfmt/Streamed_NoWarningConstructorTag.adoc[`Streamed&lowbar;NoWarningConstructorTag`] 
| A _component private_ tag type used to internally construct a `Streamed` object without a warning (about an already existing formatter)&period;
| xref:BloombergLP/bslfmt/TestSpecificationGenerator.adoc[`TestSpecificationGenerator`] 
| This class is a generator that provides a set of formatting specifications obtained by exhaustive search of all combinations of standard options&period; Its use allows easy and thorough testing of formatters for standard types&period; The generator is a state machine, each state of which corresponds to a separate specification&period;
| xref:BloombergLP/bslfmt/TestSpecificationGenerator_BoolOption.adoc[`TestSpecificationGenerator&lowbar;BoolOption`] 
| This class is an implementation of the `TestSpecificationGenerator&lowbar;Option` for options that have only two states&colon; they are either present or not&period;
| xref:BloombergLP/bslfmt/TestSpecificationGenerator_Option.adoc[`TestSpecificationGenerator&lowbar;Option`] 
| This class is a base class for `TestSpecificationGenerator` option nodes, which, when compiled into a list, represent the state of the generator&period; The payload and the process of changing this state are programmed into specific implementations of this interface&period; This class contains the basic functions of adding a new link to the options chain and finding the last link in the chain&period;
| xref:BloombergLP/bslfmt/TestSpecificationGenerator_TypedOption.adoc[`TestSpecificationGenerator&lowbar;TypedOption`] 
| This class is an implementation of the `TestSpecificationGenerator&lowbar;Option` for options that iterate through the states specified by the set of `t&lowbar;TYPE` (template parameter) values&period; The state is determined by the interaction of two class fields&colon; a flag indicating the presence of the option and a specific value for the option&period; If the flag indicates that the option is not present, the value of the second field is ignored&period;
| xref:BloombergLP/bslfmt/UnicodeCodePoint.adoc[`UnicodeCodePoint`] 
| This simply constrained (value&hyphen;semantic) attribute class characterizes a Unicode code point represented by a set of integral values&period; This class is private to this package and should not be used by clients&period;
| xref:BloombergLP/bslfmt/basic_format_arg-0d.adoc[`basic&lowbar;format&lowbar;arg`] 
| Type&hyphen;erased format argument holding a value for formatting&period;
| xref:BloombergLP/bslfmt/basic_format_args.adoc[`basic&lowbar;format&lowbar;args`] 
| A class intended to provide access to formatting arguments&period; This should not be constructed directly but indirectly using one of the `make&lowbar;format&lowbar;args` or the `make&lowbar;wformat&lowbar;args` functions&period; Note that this type has reference semantics and users must ensure that this type does not outlive the arguments used in its construction&period;
| xref:BloombergLP/bslfmt/basic_format_context.adoc[`basic&lowbar;format&lowbar;context`] 
| A format context for use by `formatter&colon;&colon;format()` partial specialization&period; It provides access to the output iterator for writing the formatted value and access to all formatting arguments&period;
| xref:BloombergLP/bslfmt/basic_format_parse_context.adoc[`basic&lowbar;format&lowbar;parse&lowbar;context`] 
| A format context for use by `formatter&colon;&colon;parse()` partial specialization&period; It provides access to iterators for the start and end of the remaining (unparsed) format string, as well as argument counters&period;
| xref:BloombergLP/bslfmt/basic_format_string.adoc[`basic&lowbar;format&lowbar;string`] 
| Type that wraps a `basic&lowbar;string&lowbar;view` for use by formatting function&period; The constructor performs additional compile&hyphen;time checks of the format string provided (not yet implemented)&period;
|===


== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslfmt/format_args.adoc[`format&lowbar;args`] 
| Alias for `basic&lowbar;format&lowbar;args` specialized on a `char` format context&period;
| xref:BloombergLP/bslfmt/format_context.adoc[`format&lowbar;context`] 
| Alias for `basic&lowbar;format&lowbar;context` specialized on `char`&period;
| xref:BloombergLP/bslfmt/format_parse_context.adoc[`format&lowbar;parse&lowbar;context`] 
| Alias for `basic&lowbar;format&lowbar;parse&lowbar;context` specialized on `char`&period;
| xref:BloombergLP/bslfmt/format_string.adoc[`format&lowbar;string`] 
| Alias for a checked `char` format string&period;
| xref:BloombergLP/bslfmt/wformat_args.adoc[`wformat&lowbar;args`] 
| Alias for `basic&lowbar;format&lowbar;args` specialized on a `wchar&lowbar;t` format context&period;
| xref:BloombergLP/bslfmt/wformat_context.adoc[`wformat&lowbar;context`] 
| Alias for `basic&lowbar;format&lowbar;context` specialized on `wchar&lowbar;t`&period;
| xref:BloombergLP/bslfmt/wformat_parse_context.adoc[`wformat&lowbar;parse&lowbar;context`] 
| Alias for `basic&lowbar;format&lowbar;parse&lowbar;context` specialized on `wchar&lowbar;t`&period;
| xref:BloombergLP/bslfmt/wformat_string.adoc[`wformat&lowbar;string`] 
| Alias for a checked `wchar&lowbar;t` format string&period;
|===


== Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslfmt/format-08.adoc[`format`] 
| `format` overloads
| xref:BloombergLP/bslfmt/format_to-0b3.adoc[`format&lowbar;to`] 
| `format&lowbar;to` overloads
| xref:BloombergLP/bslfmt/format_to_n-07.adoc[`format&lowbar;to&lowbar;n`] 
| Format `args` per `fmtStr` into `out`, writing at most `maxNumChars` characters&period;
| xref:BloombergLP/bslfmt/formatted_size-00.adoc[`formatted&lowbar;size`] 
| Calculate the length of the resulting string if the specified `args` were to be formatted according to the specification given by the specified `fmtStr`, and return the result&period;
| xref:BloombergLP/bslfmt/make_format_args.adoc[`make&lowbar;format&lowbar;args`] 
| From the specified `fmt&lowbar;args` return a type convertible to `format&lowbar;arg&lowbar;store` that is suitable for use by the `char`&hyphen;based `bslfmt&colon;&colon;format` functions&period;
| xref:BloombergLP/bslfmt/make_wformat_args.adoc[`make&lowbar;wformat&lowbar;args`] 
| From the specified `fmt&lowbar;args` return a type convertible to `format&lowbar;arg&lowbar;store` that is suitable for use by the `wchar&lowbar;t`&hyphen;based `bslfmt&colon;&colon;format` functions&period;
| xref:BloombergLP/bslfmt/print-054.adoc[`print`] 
| `print` overloads
| xref:BloombergLP/bslfmt/println-0ce.adoc[`println`] 
| `println` overloads
| xref:BloombergLP/bslfmt/streamed-07.adoc[`streamed`] 
| `streamed` overloads
| xref:BloombergLP/bslfmt/swap.adoc[`swap`] 
| Exchange the values of the specified `lhs` and `rhs`&period;
| xref:BloombergLP/bslfmt/vformat-0e.adoc[`vformat`] 
| `vformat` overloads
| xref:BloombergLP/bslfmt/vformat_to-0f.adoc[`vformat&lowbar;to`] 
| `vformat&lowbar;to` overloads
| xref:BloombergLP/bslfmt/visit_format_arg.adoc[`visit&lowbar;format&lowbar;arg`] 
| Invoke the specified `visitor` functor on the value contained by the specified `arg`, providing that functor non&hyphen;modifiable access to that value&period; `visitor` must be a `variant`&hyphen;style functor that is able to visit all supported types listed in the &lcub;DESCRIPTION&rcub;&period;
| xref:BloombergLP/bslfmt/vprint_nonunicode-06.adoc[`vprint&lowbar;nonunicode`] 
| `vprint&lowbar;nonunicode` overloads
| xref:BloombergLP/bslfmt/vprint_nonunicode_buffered.adoc[`vprint&lowbar;nonunicode&lowbar;buffered`] 
| Format the specified `args` using `bsl&colon;&colon;vformat&lowbar;to` according to the specification given by the specified `fmt` to a temporary buffer, and write the resulting buffer to the specified `stream`&period; In the event of formatting error throw the exception `format&lowbar;error`, in the event of I&sol;O error throw the exception `system&lowbar;error`, on allocation failure throw `bad&lowbar;alloc`&period; The behavior is undefined unless `stream` is a valid pointer to an output C stream&period;
| xref:BloombergLP/bslfmt/vprint_unicode-07.adoc[`vprint&lowbar;unicode`] 
| `vprint&lowbar;unicode` overloads
| xref:BloombergLP/bslfmt/vprint_unicode_buffered.adoc[`vprint&lowbar;unicode&lowbar;buffered`] 
| Format the specified `args` using `bsl&colon;&colon;vformat&lowbar;to` according to the specification given by the specified `fmt` to a temporary buffer, and write the resulting buffer to the specified `stream`&period; In the event of formatting error throw the exception `format&lowbar;error`, in the event of I&sol;O error throw the exception `system&lowbar;error`, on allocation failure throw `bad&lowbar;alloc`&period; The behavior is undefined unless `stream` is a valid pointer to an output C stream&period;
|===


== Using Declarations

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslfmt/format_error.adoc[`format&lowbar;error`] 
| Alias for `std&colon;&colon;format&lowbar;error` in the `bsl` namespace&period;
| xref:BloombergLP/bslfmt/format_to_n_result.adoc[`format&lowbar;to&lowbar;n&lowbar;result`] 
| Alias for `std&colon;&colon;format&lowbar;to&lowbar;n&lowbar;result` in the `bslfmt` namespace&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
