BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslfmt_print_ostream_imp_cpp03.h
Go to the documentation of this file.
1/// @file bslfmt_print_ostream_imp_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bslfmt_print_ostream_imp_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BSLFMT_PRINT_OSTREAM_IMP_CPP03
12#define INCLUDED_BSLFMT_PRINT_OSTREAM_IMP_CPP03
13
14/// @defgroup bslfmt_print_ostream_imp_cpp03 bslfmt_print_ostream_imp_cpp03
15/// @brief Provide C++03 implementation for bslfmt_print_ostream_imp.h
16/// @addtogroup bsl
17/// @{
18/// @addtogroup bslfmt
19/// @{
20/// @addtogroup bslfmt_print_ostream_imp_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bslfmt_print_ostream_imp_cpp03-purpose"> Purpose</a>
25/// * <a href="#bslfmt_print_ostream_imp_cpp03-classes"> Classes </a>
26/// * <a href="#bslfmt_print_ostream_imp_cpp03-description"> Description </a>
27///
28/// # Purpose {#bslfmt_print_ostream_imp_cpp03-purpose}
29/// Provide C++03 implementation for bslfmt_print_ostream_imp.h
30///
31/// # Classes {#bslfmt_print_ostream_imp_cpp03-classes}
32/// See bslfmt_print_ostream_imp.h for list of classes
33///
34/// @see bslfmt_print_ostream_imp
35///
36/// # Description {#bslfmt_print_ostream_imp_cpp03-description}
37/// This component is the C++03 translation of a C++11 component,
38/// generated by the 'sim_cpp11_features.pl' program. If the original header
39/// contains any specially delimited regions of C++11 code, then this generated
40/// file contains the C++03 equivalent, i.e., with variadic templates expanded
41/// and rvalue-references replaced by 'bslmf::MovableRef' objects. The header
42/// code in this file is designed to be '#include'd into the original header
43/// when compiling with a C++03 compiler. If there are no specially delimited
44/// regions of C++11 code, then this header contains no code and is not
45/// '#include'd in the original header.
46///
47/// Generated on Tue Jun 2 11:47:33 2026
48/// Command line: sim_cpp11_features.pl bslfmt_print_ostream_imp.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bsl
54 * @{
55 */
56/** @addtogroup bslfmt
57 * @{
58 */
59/** @addtogroup bslfmt_print_ostream_imp_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BSLFMT_PRINT_OSTREAM_IMP_H
64
65#if defined(BSLS_COMPILERFEATURES_SUPPORT_ALIAS_TEMPLATES) && \
66 defined(BSLS_COMPILERFEATURES_SUPPORT_VARIADIC_TEMPLATES)
67# define BSLFMT_FORMAT_STRING_PARAMETER bsl::format_string<t_ARGS...>
68#else
69// We cannot define format_string<t_ARGS...> in a C++03 compliant manner, so
70// have to use non-template versions instead.
71# define BSLFMT_FORMAT_STRING_PARAMETER bsl::format_string
72#endif
73
74
75namespace bslfmt {
76
77 // --------------
78 // FREE FUNCTIONS
79 // --------------
80
81#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
82// {{{ BEGIN GENERATED CODE
83// Command line: sim_cpp11_features.pl bslfmt_print_ostream_imp.h
84#ifndef BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT
85#define BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT 10
86#endif
87#ifndef BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A
88#define BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT
89#endif
90#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 0
91void print(std::ostream& stream,
93#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 0
94
95#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 1
96template <class t_ARGS_01>
97void print(std::ostream& stream,
99 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01);
100#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 1
101
102#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 2
103template <class t_ARGS_01,
104 class t_ARGS_02>
105void print(std::ostream& stream,
107 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
108 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02);
109#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 2
110
111#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 3
112template <class t_ARGS_01,
113 class t_ARGS_02,
114 class t_ARGS_03>
115void print(std::ostream& stream,
117 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
118 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
119 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03);
120#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 3
121
122#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 4
123template <class t_ARGS_01,
124 class t_ARGS_02,
125 class t_ARGS_03,
126 class t_ARGS_04>
127void print(std::ostream& stream,
129 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
130 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
131 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
132 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04);
133#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 4
134
135#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 5
136template <class t_ARGS_01,
137 class t_ARGS_02,
138 class t_ARGS_03,
139 class t_ARGS_04,
140 class t_ARGS_05>
141void print(std::ostream& stream,
143 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
144 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
145 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
146 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
147 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05);
148#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 5
149
150#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 6
151template <class t_ARGS_01,
152 class t_ARGS_02,
153 class t_ARGS_03,
154 class t_ARGS_04,
155 class t_ARGS_05,
156 class t_ARGS_06>
157void print(std::ostream& stream,
159 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
160 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
161 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
162 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
163 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
164 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06);
165#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 6
166
167#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 7
168template <class t_ARGS_01,
169 class t_ARGS_02,
170 class t_ARGS_03,
171 class t_ARGS_04,
172 class t_ARGS_05,
173 class t_ARGS_06,
174 class t_ARGS_07>
175void print(std::ostream& stream,
177 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
178 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
179 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
180 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
181 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
182 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
183 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07);
184#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 7
185
186#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 8
187template <class t_ARGS_01,
188 class t_ARGS_02,
189 class t_ARGS_03,
190 class t_ARGS_04,
191 class t_ARGS_05,
192 class t_ARGS_06,
193 class t_ARGS_07,
194 class t_ARGS_08>
195void print(std::ostream& stream,
197 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
198 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
199 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
200 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
201 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
202 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
203 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
204 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08);
205#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 8
206
207#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 9
208template <class t_ARGS_01,
209 class t_ARGS_02,
210 class t_ARGS_03,
211 class t_ARGS_04,
212 class t_ARGS_05,
213 class t_ARGS_06,
214 class t_ARGS_07,
215 class t_ARGS_08,
216 class t_ARGS_09>
217void print(std::ostream& stream,
219 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
220 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
221 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
222 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
223 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
224 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
225 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
226 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08,
227 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) args_09);
228#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 9
229
230#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 10
231template <class t_ARGS_01,
232 class t_ARGS_02,
233 class t_ARGS_03,
234 class t_ARGS_04,
235 class t_ARGS_05,
236 class t_ARGS_06,
237 class t_ARGS_07,
238 class t_ARGS_08,
239 class t_ARGS_09,
240 class t_ARGS_10>
241void print(std::ostream& stream,
243 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
244 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
245 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
246 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
247 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
248 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
249 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
250 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08,
251 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) args_09,
252 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) args_10);
253#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 10
254
255
256#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 0
257void println(std::ostream& stream,
259#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 0
260
261#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 1
262template <class t_ARGS_01>
263void println(std::ostream& stream,
265 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01);
266#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 1
267
268#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 2
269template <class t_ARGS_01,
270 class t_ARGS_02>
271void println(std::ostream& stream,
273 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
274 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02);
275#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 2
276
277#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 3
278template <class t_ARGS_01,
279 class t_ARGS_02,
280 class t_ARGS_03>
281void println(std::ostream& stream,
283 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
284 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
285 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03);
286#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 3
287
288#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 4
289template <class t_ARGS_01,
290 class t_ARGS_02,
291 class t_ARGS_03,
292 class t_ARGS_04>
293void println(std::ostream& stream,
295 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
296 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
297 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
298 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04);
299#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 4
300
301#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 5
302template <class t_ARGS_01,
303 class t_ARGS_02,
304 class t_ARGS_03,
305 class t_ARGS_04,
306 class t_ARGS_05>
307void println(std::ostream& stream,
309 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
310 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
311 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
312 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
313 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05);
314#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 5
315
316#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 6
317template <class t_ARGS_01,
318 class t_ARGS_02,
319 class t_ARGS_03,
320 class t_ARGS_04,
321 class t_ARGS_05,
322 class t_ARGS_06>
323void println(std::ostream& stream,
325 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
326 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
327 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
328 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
329 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
330 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06);
331#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 6
332
333#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 7
334template <class t_ARGS_01,
335 class t_ARGS_02,
336 class t_ARGS_03,
337 class t_ARGS_04,
338 class t_ARGS_05,
339 class t_ARGS_06,
340 class t_ARGS_07>
341void println(std::ostream& stream,
343 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
344 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
345 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
346 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
347 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
348 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
349 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07);
350#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 7
351
352#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 8
353template <class t_ARGS_01,
354 class t_ARGS_02,
355 class t_ARGS_03,
356 class t_ARGS_04,
357 class t_ARGS_05,
358 class t_ARGS_06,
359 class t_ARGS_07,
360 class t_ARGS_08>
361void println(std::ostream& stream,
363 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
364 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
365 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
366 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
367 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
368 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
369 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
370 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08);
371#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 8
372
373#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 9
374template <class t_ARGS_01,
375 class t_ARGS_02,
376 class t_ARGS_03,
377 class t_ARGS_04,
378 class t_ARGS_05,
379 class t_ARGS_06,
380 class t_ARGS_07,
381 class t_ARGS_08,
382 class t_ARGS_09>
383void println(std::ostream& stream,
385 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
386 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
387 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
388 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
389 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
390 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
391 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
392 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08,
393 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) args_09);
394#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 9
395
396#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 10
397template <class t_ARGS_01,
398 class t_ARGS_02,
399 class t_ARGS_03,
400 class t_ARGS_04,
401 class t_ARGS_05,
402 class t_ARGS_06,
403 class t_ARGS_07,
404 class t_ARGS_08,
405 class t_ARGS_09,
406 class t_ARGS_10>
407void println(std::ostream& stream,
409 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
410 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
411 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
412 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
413 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
414 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
415 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
416 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08,
417 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) args_09,
418 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) args_10);
419#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_A >= 10
420
421#else
422// The generated code below is a workaround for the absence of perfect
423// forwarding in some compilers.
424template <class... t_ARGS>
425void print(std::ostream& stream,
427 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... args);
428
429template <class... t_ARGS>
430void println(std::ostream& stream,
432 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... args);
433// }}} END GENERATED CODE
434#endif
435
436/// Write `\n` to the specified `stream`.
437/// \pre The behavior is undefined unless
438/// `stream` is a valid pointer to an output C stream.
439void println(std::ostream& stream);
440
441/// Format the specified `args` using `bsl::vformat_to` according to the
442/// specification given by the specified `fmt`, and write the result of this
443/// operation to the specified `stream`. In the event of formatting error
444/// throw the exception @ref format_error , in the event of I/O error throw the
445/// exception @ref system_error , on allocation failure throw @ref bad_alloc .
446///
447/// \pre The behavior is undefined unless `stream` is a valid pointer to an output C
448/// stream.
449void vprint_nonunicode(std::ostream& stream,
451 bsl::format_args args);
452
453/// Format the specified `args` using `bsl::vformat_to` according to the
454/// specification given by the specified `fmt`, and write the result of this
455/// operation to the specified `stream`. In the event of formatting error
456/// throw the exception @ref format_error , in the event of I/O error throw the
457/// exception @ref system_error , on allocation failure throw @ref bad_alloc .
458///
459/// \pre The behavior is undefined unless `stream` is a valid pointer to an output C
460/// stream.
461void vprint_unicode(std::ostream& stream,
463 bsl::format_args args);
464
465// ============================================================================
466// INLINE DEFINITIONS
467// ============================================================================
468
469 // --------------
470 // FREE FUNCTIONS
471 // --------------
472
473#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
474// {{{ BEGIN GENERATED CODE
475// Command line: sim_cpp11_features.pl bslfmt_print_ostream_imp.h
476#ifndef BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT
477#define BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT 10
478#endif
479#ifndef BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B
480#define BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT
481#endif
482#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 0
483inline
484void print(std::ostream& stream,
486{
488 fmt.get(),
489 bsl::make_format_args());
490}
491#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 0
492
493#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 1
494template <class t_ARGS_01>
495inline
496void print(std::ostream& stream,
498 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01)
499{
501 fmt.get(),
502 bsl::make_format_args(args_01));
503}
504#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 1
505
506#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 2
507template <class t_ARGS_01,
508 class t_ARGS_02>
509inline
510void print(std::ostream& stream,
512 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
513 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02)
514{
516 fmt.get(),
517 bsl::make_format_args(args_01,
518 args_02));
519}
520#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 2
521
522#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 3
523template <class t_ARGS_01,
524 class t_ARGS_02,
525 class t_ARGS_03>
526inline
527void print(std::ostream& stream,
529 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
530 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
531 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03)
532{
534 fmt.get(),
535 bsl::make_format_args(args_01,
536 args_02,
537 args_03));
538}
539#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 3
540
541#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 4
542template <class t_ARGS_01,
543 class t_ARGS_02,
544 class t_ARGS_03,
545 class t_ARGS_04>
546inline
547void print(std::ostream& stream,
549 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
550 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
551 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
552 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04)
553{
555 fmt.get(),
556 bsl::make_format_args(args_01,
557 args_02,
558 args_03,
559 args_04));
560}
561#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 4
562
563#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 5
564template <class t_ARGS_01,
565 class t_ARGS_02,
566 class t_ARGS_03,
567 class t_ARGS_04,
568 class t_ARGS_05>
569inline
570void print(std::ostream& stream,
572 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
573 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
574 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
575 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
576 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05)
577{
579 fmt.get(),
580 bsl::make_format_args(args_01,
581 args_02,
582 args_03,
583 args_04,
584 args_05));
585}
586#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 5
587
588#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 6
589template <class t_ARGS_01,
590 class t_ARGS_02,
591 class t_ARGS_03,
592 class t_ARGS_04,
593 class t_ARGS_05,
594 class t_ARGS_06>
595inline
596void print(std::ostream& stream,
598 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
599 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
600 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
601 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
602 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
603 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06)
604{
606 fmt.get(),
607 bsl::make_format_args(args_01,
608 args_02,
609 args_03,
610 args_04,
611 args_05,
612 args_06));
613}
614#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 6
615
616#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 7
617template <class t_ARGS_01,
618 class t_ARGS_02,
619 class t_ARGS_03,
620 class t_ARGS_04,
621 class t_ARGS_05,
622 class t_ARGS_06,
623 class t_ARGS_07>
624inline
625void print(std::ostream& stream,
627 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
628 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
629 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
630 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
631 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
632 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
633 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07)
634{
636 fmt.get(),
637 bsl::make_format_args(args_01,
638 args_02,
639 args_03,
640 args_04,
641 args_05,
642 args_06,
643 args_07));
644}
645#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 7
646
647#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 8
648template <class t_ARGS_01,
649 class t_ARGS_02,
650 class t_ARGS_03,
651 class t_ARGS_04,
652 class t_ARGS_05,
653 class t_ARGS_06,
654 class t_ARGS_07,
655 class t_ARGS_08>
656inline
657void print(std::ostream& stream,
659 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
660 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
661 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
662 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
663 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
664 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
665 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
666 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08)
667{
669 fmt.get(),
670 bsl::make_format_args(args_01,
671 args_02,
672 args_03,
673 args_04,
674 args_05,
675 args_06,
676 args_07,
677 args_08));
678}
679#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 8
680
681#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 9
682template <class t_ARGS_01,
683 class t_ARGS_02,
684 class t_ARGS_03,
685 class t_ARGS_04,
686 class t_ARGS_05,
687 class t_ARGS_06,
688 class t_ARGS_07,
689 class t_ARGS_08,
690 class t_ARGS_09>
691inline
692void print(std::ostream& stream,
694 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
695 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
696 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
697 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
698 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
699 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
700 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
701 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08,
702 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) args_09)
703{
705 fmt.get(),
706 bsl::make_format_args(args_01,
707 args_02,
708 args_03,
709 args_04,
710 args_05,
711 args_06,
712 args_07,
713 args_08,
714 args_09));
715}
716#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 9
717
718#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 10
719template <class t_ARGS_01,
720 class t_ARGS_02,
721 class t_ARGS_03,
722 class t_ARGS_04,
723 class t_ARGS_05,
724 class t_ARGS_06,
725 class t_ARGS_07,
726 class t_ARGS_08,
727 class t_ARGS_09,
728 class t_ARGS_10>
729inline
730void print(std::ostream& stream,
732 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
733 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
734 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
735 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
736 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
737 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
738 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
739 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08,
740 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) args_09,
741 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) args_10)
742{
744 fmt.get(),
745 bsl::make_format_args(args_01,
746 args_02,
747 args_03,
748 args_04,
749 args_05,
750 args_06,
751 args_07,
752 args_08,
753 args_09,
754 args_10));
755}
756#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 10
757
758
759#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 0
760inline
761void println(std::ostream& stream,
763{
764 bslfmt::print(stream,
765 "{}\n",
766 bsl::vformat(fmt.get(), bsl::make_format_args()));
767}
768#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 0
769
770#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 1
771template <class t_ARGS_01>
772inline
773void println(std::ostream& stream,
775 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01)
776{
777 bslfmt::print(stream,
778 "{}\n",
779 bsl::vformat(fmt.get(), bsl::make_format_args(args_01)));
780}
781#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 1
782
783#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 2
784template <class t_ARGS_01,
785 class t_ARGS_02>
786inline
787void println(std::ostream& stream,
789 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
790 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02)
791{
792 bslfmt::print(stream,
793 "{}\n",
794 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
795 args_02)));
796}
797#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 2
798
799#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 3
800template <class t_ARGS_01,
801 class t_ARGS_02,
802 class t_ARGS_03>
803inline
804void println(std::ostream& stream,
806 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
807 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
808 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03)
809{
810 bslfmt::print(stream,
811 "{}\n",
812 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
813 args_02,
814 args_03)));
815}
816#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 3
817
818#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 4
819template <class t_ARGS_01,
820 class t_ARGS_02,
821 class t_ARGS_03,
822 class t_ARGS_04>
823inline
824void println(std::ostream& stream,
826 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
827 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
828 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
829 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04)
830{
831 bslfmt::print(stream,
832 "{}\n",
833 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
834 args_02,
835 args_03,
836 args_04)));
837}
838#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 4
839
840#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 5
841template <class t_ARGS_01,
842 class t_ARGS_02,
843 class t_ARGS_03,
844 class t_ARGS_04,
845 class t_ARGS_05>
846inline
847void println(std::ostream& stream,
849 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
850 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
851 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
852 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
853 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05)
854{
855 bslfmt::print(stream,
856 "{}\n",
857 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
858 args_02,
859 args_03,
860 args_04,
861 args_05)));
862}
863#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 5
864
865#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 6
866template <class t_ARGS_01,
867 class t_ARGS_02,
868 class t_ARGS_03,
869 class t_ARGS_04,
870 class t_ARGS_05,
871 class t_ARGS_06>
872inline
873void println(std::ostream& stream,
875 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
876 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
877 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
878 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
879 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
880 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06)
881{
882 bslfmt::print(stream,
883 "{}\n",
884 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
885 args_02,
886 args_03,
887 args_04,
888 args_05,
889 args_06)));
890}
891#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 6
892
893#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 7
894template <class t_ARGS_01,
895 class t_ARGS_02,
896 class t_ARGS_03,
897 class t_ARGS_04,
898 class t_ARGS_05,
899 class t_ARGS_06,
900 class t_ARGS_07>
901inline
902void println(std::ostream& stream,
904 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
905 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
906 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
907 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
908 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
909 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
910 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07)
911{
912 bslfmt::print(stream,
913 "{}\n",
914 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
915 args_02,
916 args_03,
917 args_04,
918 args_05,
919 args_06,
920 args_07)));
921}
922#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 7
923
924#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 8
925template <class t_ARGS_01,
926 class t_ARGS_02,
927 class t_ARGS_03,
928 class t_ARGS_04,
929 class t_ARGS_05,
930 class t_ARGS_06,
931 class t_ARGS_07,
932 class t_ARGS_08>
933inline
934void println(std::ostream& stream,
936 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
937 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
938 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
939 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
940 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
941 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
942 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
943 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08)
944{
945 bslfmt::print(stream,
946 "{}\n",
947 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
948 args_02,
949 args_03,
950 args_04,
951 args_05,
952 args_06,
953 args_07,
954 args_08)));
955}
956#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 8
957
958#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 9
959template <class t_ARGS_01,
960 class t_ARGS_02,
961 class t_ARGS_03,
962 class t_ARGS_04,
963 class t_ARGS_05,
964 class t_ARGS_06,
965 class t_ARGS_07,
966 class t_ARGS_08,
967 class t_ARGS_09>
968inline
969void println(std::ostream& stream,
971 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
972 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
973 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
974 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
975 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
976 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
977 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
978 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08,
979 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) args_09)
980{
981 bslfmt::print(stream,
982 "{}\n",
983 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
984 args_02,
985 args_03,
986 args_04,
987 args_05,
988 args_06,
989 args_07,
990 args_08,
991 args_09)));
992}
993#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 9
994
995#if BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 10
996template <class t_ARGS_01,
997 class t_ARGS_02,
998 class t_ARGS_03,
999 class t_ARGS_04,
1000 class t_ARGS_05,
1001 class t_ARGS_06,
1002 class t_ARGS_07,
1003 class t_ARGS_08,
1004 class t_ARGS_09,
1005 class t_ARGS_10>
1006inline
1007void println(std::ostream& stream,
1009 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_01) args_01,
1010 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_02) args_02,
1011 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_03) args_03,
1012 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_04) args_04,
1013 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_05) args_05,
1014 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_06) args_06,
1015 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_07) args_07,
1016 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_08) args_08,
1017 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_09) args_09,
1018 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS_10) args_10)
1019{
1020 bslfmt::print(stream,
1021 "{}\n",
1022 bsl::vformat(fmt.get(), bsl::make_format_args(args_01,
1023 args_02,
1024 args_03,
1025 args_04,
1026 args_05,
1027 args_06,
1028 args_07,
1029 args_08,
1030 args_09,
1031 args_10)));
1032}
1033#endif // BSLFMT_PRINT_OSTREAM_IMP_VARIADIC_LIMIT_B >= 10
1034
1035#else
1036// The generated code below is a workaround for the absence of perfect
1037// forwarding in some compilers.
1038template <class... t_ARGS>
1039inline
1040void print(std::ostream& stream,
1042 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... args)
1043{
1045 fmt.get(),
1046 bsl::make_format_args(args...));
1047}
1048
1049template <class... t_ARGS>
1050inline
1051void println(std::ostream& stream,
1053 BSLS_COMPILERFEATURES_FORWARD_REF(t_ARGS)... args)
1054{
1055 bslfmt::print(stream,
1056 "{}\n",
1057 bsl::vformat(fmt.get(), bsl::make_format_args(args...)));
1058}
1059// }}} END GENERATED CODE
1060#endif
1061
1062inline
1063void println(std::ostream& stream)
1064{
1065 bslfmt::print(stream, "\n");
1066}
1067
1068} // close package namespace
1069
1070
1071#undef BSLFMT_FORMAT_STRING_PARAMETER
1072
1073#else // if ! defined(DEFINED_BSLFMT_PRINT_OSTREAM_IMP_H)
1074# error Not valid except when included from bslfmt_print_ostream_imp.h
1075#endif // ! defined(COMPILING_BSLFMT_PRINT_OSTREAM_IMP_H)
1076
1077#endif // ! defined(INCLUDED_BSLFMT_PRINT_OSTREAM_IMP_CPP03)
1078
1079// ----------------------------------------------------------------------------
1080// Copyright 2025 Bloomberg Finance L.P.
1081//
1082// Licensed under the Apache License, Version 2.0 (the "License");
1083// you may not use this file except in compliance with the License.
1084// You may obtain a copy of the License at
1085//
1086// http://www.apache.org/licenses/LICENSE-2.0
1087//
1088// Unless required by applicable law or agreed to in writing, software
1089// distributed under the License is distributed on an "AS IS" BASIS,
1090// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1091// See the License for the specific language governing permissions and
1092// limitations under the License.
1093// ----------------------------- END-OF-FILE ----------------------------------
1094
1095/** @} */
1096/** @} */
1097/** @} */
Definition bslstl_stringview.h:471
#define BSLFMT_FORMAT_STRING_PARAMETER
Definition bslfmt_format_imp.h:209
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2343
bsl::ostream & print(bsl::ostream &stream, const TYPE &object, int level=0, int spacesPerLevel=4)
Definition bdlb_printmethods.h:725
Definition bslfmt_enablestreamedformatter.h:130
void print(BSLFMT_FORMAT_STRING_PARAMETER fmt, t_ARGS &&... args)
Definition bslfmt_print_imp.h:263
void vprint_unicode(bsl::string_view fmt, bsl::format_args args)
Definition bslfmt_print_imp.h:300
void println()
Write \n into stdout.
Definition bslfmt_print_imp.h:288
void vprint_nonunicode(bsl::string_view fmt, bsl::format_args args)
Definition bslfmt_print_imp.h:294