BDE 4.14.0 Production release
|
Provide BSL implementations for standard <iomanip> features.
Canonical header: bsl_iomanip.h
This component is for internal use only. Please include <bsl_iomanip.h>
instead.
This component exists to provide BSL implementations for facilities in the standard <iomanip> header. While most of the facilities in bsl_iomanip.h
are simply aliases to the platform standard library, some of them need BSL specific implementations. For example, this component provides implementations for bsl::quoted
overloads that accept bsl::basic_string
and proprietary bsl::string_view
objects.
This section illustrates intended use of this component.
Suppose we want to serialize some data into JSON.
First, we define a struct, Employee
, to contain the data:
Then, we create an Employee
object and populate it with data:
Now, we create an output stream and manually construct the JSON string using bsl::quoted
:
Finally, we check out the JSON string:
The output should look like: