BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslfmt_print_ostream.h
Go to the documentation of this file.
1/// @file bslfmt_print_ostream.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslfmt_print_ostream.h -*-C++-*-
8#ifndef INCLUDED_BSLFMT_PRINT_OSTREAM
9#define INCLUDED_BSLFMT_PRINT_OSTREAM
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bslfmt_print_ostream bslfmt_print_ostream
15/// @brief Provide a standard compliant `print(ostream)` implementation.
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslfmt
19/// @{
20/// @addtogroup bslfmt_print_ostream
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslfmt_print_ostream-purpose"> Purpose</a>
25/// * <a href="#bslfmt_print_ostream-classes"> Classes </a>
26/// * <a href="#bslfmt_print_ostream-canonical-header"> Canonical Header </a>
27/// * <a href="#bslfmt_print_ostream-description"> Description </a>
28///
29/// # Purpose {#bslfmt_print_ostream-purpose}
30/// Provide a standard compliant `print(ostream)` implementation.
31///
32/// # Classes {#bslfmt_print_ostream-classes}
33///
34///
35/// # Canonical Header {#bslfmt_print_ostream-canonical-header}
36/// bsl_print_ostream.h
37///
38/// @see ISO C++ Standard, <ostream>, <print>
39///
40/// # Description {#bslfmt_print_ostream-description}
41/// This component will provide, in the `bsl` namespace, wrappers
42/// around the `print` and related functions exposed by the standard `<ostream>`
43/// header, where they are available, otherwise aliases to the `bslfmt`
44/// implementation. In this implementation, these functions are only provided
45/// via the `bsl_print_ostream.h` header, and are not include in `<ostream>` or
46/// `bsl_print.h` to avoid overhead for users that do not need them. Including
47/// this functionality by default causes too much debug information growth in
48/// existing large systems that do not use `print`.
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslfmt
57 * @{
58 */
59/** @addtogroup bslfmt_print_ostream
60 * @{
61 */
62
63#include <bslscm_version.h>
64
66
67#ifdef BSLS_LIBRARYFEATURES_HAS_CPP23_PRINT
68#include <ostream>
69#else
71#endif
72
73namespace bsl {
74
75#ifdef BSLS_LIBRARYFEATURES_HAS_CPP23_PRINT
76
77using std::print;
78using std::println;
79using std::vprint_nonunicode;
80using std::vprint_unicode;
81
82#else
83
84using BloombergLP::bslfmt::print;
85using BloombergLP::bslfmt::println;
86using BloombergLP::bslfmt::vprint_nonunicode;
87using BloombergLP::bslfmt::vprint_unicode;
88
89#endif
90
91} // close namespace bsl
92
93#endif
94
95// ----------------------------------------------------------------------------
96// Copyright 2025 Bloomberg Finance L.P.
97//
98// Licensed under the Apache License, Version 2.0 (the "License");
99// you may not use this file except in compliance with the License.
100// You may obtain a copy of the License at
101//
102// http://www.apache.org/licenses/LICENSE-2.0
103//
104// Unless required by applicable law or agreed to in writing, software
105// distributed under the License is distributed on an "AS IS" BASIS,
106// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
107// See the License for the specific language governing permissions and
108// limitations under the License.
109// ----------------------------- END-OF-FILE ----------------------------------
110
111/** @} */
112/** @} */
113/** @} */
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdlat_valuetypefunctions.h:939