|
BDE 4.39.x Production Release
|
Provide a standard compliant print(FILE) implementation.
Provide a standard compliant print(FILE) implementation.
bsl_print.h
This component provides, in the BloombergLP::bslfmt namespace, functions exposed by the standard <print> header. These are available for C++03 and later.
There are 2 high-level sets of functions, that most users should use:
printprintln (incl. no-args version)The only difference is that println always appends '
' to the formatted output. The no-arguments version of println just writes '
'.
Also there are 4 variants of low-level vprint function:
The _buffered flavour of functions formats the result into a temporary string and then writes the result to the stream. The functions without the _buffered suffix permit potentially more efficient implementation that involves explicit stream locking and writing directly to it, but it can cause deadlocks when used inappropriately. The current implementation always uses an intermediate buffer for formatting, despite the presence of the _buffered suffix.
The _unicode set of functions is used by print and println if the ordinary literal encoding is UTF-8; otherwise the _nonunicode functions are used. Note that for most non-Windows target platforms, there is no implementation difference between the 2 sets.
| #define BSLFMT_FORMAT_STRING_PARAMETER bsl::format_string |