BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslfmt_print_imp

Detailed Description

Provide a standard compliant print(FILE) implementation.

Outline

Purpose

Provide a standard compliant print(FILE) implementation.

Classes

Canonical Header

bsl_print.h

See also
ISO C++ Standard, <print>

Description

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:

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.

Macro Definition Documentation

◆ BSLFMT_FORMAT_STRING_PARAMETER

#define BSLFMT_FORMAT_STRING_PARAMETER   bsl::format_string