BDE 4.14.0 Production release
Loading...
Searching...
No Matches
bdlma_localbufferedobject_cpp03.h
Go to the documentation of this file.
1/// @file bdlma_localbufferedobject_cpp03.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bdlma_localbufferedobject_cpp03.h -*-C++-*-
8
9// Automatically generated file. **DO NOT EDIT**
10
11#ifndef INCLUDED_BDLMA_LOCALBUFFEREDOBJECT_CPP03
12#define INCLUDED_BDLMA_LOCALBUFFEREDOBJECT_CPP03
13
14/// @defgroup bdlma_localbufferedobject_cpp03 bdlma_localbufferedobject_cpp03
15/// @brief Provide C++03 implementation for bdlma_localbufferedobject.h
16/// @addtogroup bdl
17/// @{
18/// @addtogroup bdlma
19/// @{
20/// @addtogroup bdlma_localbufferedobject_cpp03
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bdlma_localbufferedobject_cpp03-purpose"> Purpose</a>
25/// * <a href="#bdlma_localbufferedobject_cpp03-classes"> Classes </a>
26/// * <a href="#bdlma_localbufferedobject_cpp03-description"> Description </a>
27///
28/// # Purpose {#bdlma_localbufferedobject_cpp03-purpose}
29/// Provide C++03 implementation for bdlma_localbufferedobject.h
30///
31/// # Classes {#bdlma_localbufferedobject_cpp03-classes}
32/// See bdlma_localbufferedobject.h for list of classes
33///
34/// @see bdlma_localbufferedobject
35///
36/// # Description {#bdlma_localbufferedobject_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 Sun Sep 1 06:02:06 2024
48/// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
49/// @}
50/** @} */
51/** @} */
52
53/** @addtogroup bdl
54 * @{
55 */
56/** @addtogroup bdlma
57 * @{
58 */
59/** @addtogroup bdlma_localbufferedobject_cpp03
60 * @{
61 */
62
63#ifdef COMPILING_BDLMA_LOCALBUFFEREDOBJECT_H
64
65#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
66#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC) \
67 std::is_assignable<DST, SRC>::value
68#else
69#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC) true
70#endif
71
72
73namespace bdlma {
74
75 // =========================
76 // class LocalBufferedObject
77 // =========================
78
79/// This `class` contains an object of type `t_TYPE` and a local sequential
80/// allocator with an arena size of `t_BUFFER_SIZE`, from which the `t_TYPE`
81/// object allocates memory, in a single object. The
82/// `t_DISABLE_DESTRUCTION` template parameter can be used to prevent this
83/// `class` from calling `~t_TYPE()` in cases where it is known that
84/// `t_TYPE` manages no resources other than memory, since the memory will
85/// be adequately managed by the local sequential allocator.
86///
87/// See @ref bdlma_localbufferedobject_cpp03
88template <class t_TYPE,
89 bsl::size_t t_BUFFER_SIZE = 1024,
90 bool t_DISABLE_DESTRUCTION = false>
91class LocalBufferedObject {
92
94
95 public:
96 // PUBLIC TYPES
97 typedef t_TYPE value_type;
99
100 enum { k_BUFFER_SIZE = t_BUFFER_SIZE }; // The 'size' template
101 // parameter to 'LocalAllocator'
102 // takes an 'int', not 'size_t'.
103
104 private:
105 // DATA
108
109 private:
110 // NOT IMPLEMENTED
111 LocalBufferedObject(const LocalBufferedObject&) BSLS_KEYWORD_DELETED;
112 LocalBufferedObject& operator=(const LocalBufferedObject&)
114
115 // PRIVATE MANIPULATORS
116
117 /// Call `d_arenaAllocator.release()`. If `t_DISABLE_DESTRUCTION` is
118 /// `false`, destroy the held object first.
119 void destroyHeldObject();
120
121 public:
122 // TRAITS
123 BSLMF_NESTED_TRAIT_DECLARATION(LocalBufferedObject,
124 BloombergLP::bslmf::UsesAllocatorArgT);
125
126 // CREATORS
127#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
128// {{{ BEGIN GENERATED CODE
129// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
130#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
131#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT 10
132#endif
133#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A
134#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
135#endif
136#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 0
137 explicit LocalBufferedObject(
138 );
139#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 0
140
141#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 1
142 template <class ARGS_01>
143 explicit LocalBufferedObject(
144 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01);
145#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 1
146
147#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 2
148 template <class ARGS_01,
149 class ARGS_02>
150 explicit LocalBufferedObject(
151 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
152 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02);
153#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 2
154
155#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 3
156 template <class ARGS_01,
157 class ARGS_02,
158 class ARGS_03>
159 explicit LocalBufferedObject(
160 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
161 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
162 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03);
163#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 3
164
165#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 4
166 template <class ARGS_01,
167 class ARGS_02,
168 class ARGS_03,
169 class ARGS_04>
170 explicit LocalBufferedObject(
171 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
172 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
173 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
174 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04);
175#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 4
176
177#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 5
178 template <class ARGS_01,
179 class ARGS_02,
180 class ARGS_03,
181 class ARGS_04,
182 class ARGS_05>
183 explicit LocalBufferedObject(
184 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
185 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
186 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
187 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
188 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05);
189#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 5
190
191#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 6
192 template <class ARGS_01,
193 class ARGS_02,
194 class ARGS_03,
195 class ARGS_04,
196 class ARGS_05,
197 class ARGS_06>
198 explicit LocalBufferedObject(
199 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
200 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
201 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
202 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
203 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
204 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06);
205#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 6
206
207#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 7
208 template <class ARGS_01,
209 class ARGS_02,
210 class ARGS_03,
211 class ARGS_04,
212 class ARGS_05,
213 class ARGS_06,
214 class ARGS_07>
215 explicit LocalBufferedObject(
216 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
217 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
218 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
219 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
220 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
221 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
222 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07);
223#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 7
224
225#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 8
226 template <class ARGS_01,
227 class ARGS_02,
228 class ARGS_03,
229 class ARGS_04,
230 class ARGS_05,
231 class ARGS_06,
232 class ARGS_07,
233 class ARGS_08>
234 explicit LocalBufferedObject(
235 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
236 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
237 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
238 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
239 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
240 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
241 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
242 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08);
243#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 8
244
245#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 9
246 template <class ARGS_01,
247 class ARGS_02,
248 class ARGS_03,
249 class ARGS_04,
250 class ARGS_05,
251 class ARGS_06,
252 class ARGS_07,
253 class ARGS_08,
254 class ARGS_09>
255 explicit LocalBufferedObject(
256 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
257 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
258 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
259 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
260 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
261 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
262 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
263 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
264 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09);
265#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 9
266
267#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 10
268 template <class ARGS_01,
269 class ARGS_02,
270 class ARGS_03,
271 class ARGS_04,
272 class ARGS_05,
273 class ARGS_06,
274 class ARGS_07,
275 class ARGS_08,
276 class ARGS_09,
277 class ARGS_10>
278 explicit LocalBufferedObject(
279 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
280 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
281 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
282 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
283 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
284 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
285 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
286 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
287 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
288 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10);
289#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 10
290
291
292#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 0
293 LocalBufferedObject(bsl::allocator_arg_t ,
294 allocator_type allocator);
295#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 0
296
297#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 1
298 template <class ARGS_01>
299 LocalBufferedObject(bsl::allocator_arg_t ,
300 allocator_type allocator,
301 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01);
302#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 1
303
304#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 2
305 template <class ARGS_01,
306 class ARGS_02>
307 LocalBufferedObject(bsl::allocator_arg_t ,
308 allocator_type allocator,
309 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
310 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02);
311#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 2
312
313#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 3
314 template <class ARGS_01,
315 class ARGS_02,
316 class ARGS_03>
317 LocalBufferedObject(bsl::allocator_arg_t ,
318 allocator_type allocator,
319 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
320 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
321 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03);
322#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 3
323
324#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 4
325 template <class ARGS_01,
326 class ARGS_02,
327 class ARGS_03,
328 class ARGS_04>
329 LocalBufferedObject(bsl::allocator_arg_t ,
330 allocator_type allocator,
331 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
332 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
333 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
334 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04);
335#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 4
336
337#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 5
338 template <class ARGS_01,
339 class ARGS_02,
340 class ARGS_03,
341 class ARGS_04,
342 class ARGS_05>
343 LocalBufferedObject(bsl::allocator_arg_t ,
344 allocator_type allocator,
345 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
346 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
347 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
348 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
349 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05);
350#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 5
351
352#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 6
353 template <class ARGS_01,
354 class ARGS_02,
355 class ARGS_03,
356 class ARGS_04,
357 class ARGS_05,
358 class ARGS_06>
359 LocalBufferedObject(bsl::allocator_arg_t ,
360 allocator_type allocator,
361 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
362 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
363 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
364 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
365 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
366 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06);
367#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 6
368
369#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 7
370 template <class ARGS_01,
371 class ARGS_02,
372 class ARGS_03,
373 class ARGS_04,
374 class ARGS_05,
375 class ARGS_06,
376 class ARGS_07>
377 LocalBufferedObject(bsl::allocator_arg_t ,
378 allocator_type allocator,
379 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
380 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
381 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
382 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
383 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
384 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
385 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07);
386#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 7
387
388#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 8
389 template <class ARGS_01,
390 class ARGS_02,
391 class ARGS_03,
392 class ARGS_04,
393 class ARGS_05,
394 class ARGS_06,
395 class ARGS_07,
396 class ARGS_08>
397 LocalBufferedObject(bsl::allocator_arg_t ,
398 allocator_type allocator,
399 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
400 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
401 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
402 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
403 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
404 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
405 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
406 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08);
407#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 8
408
409#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 9
410 template <class ARGS_01,
411 class ARGS_02,
412 class ARGS_03,
413 class ARGS_04,
414 class ARGS_05,
415 class ARGS_06,
416 class ARGS_07,
417 class ARGS_08,
418 class ARGS_09>
419 LocalBufferedObject(bsl::allocator_arg_t ,
420 allocator_type allocator,
421 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
422 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
423 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
424 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
425 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
426 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
427 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
428 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
429 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09);
430#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 9
431
432#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 10
433 template <class ARGS_01,
434 class ARGS_02,
435 class ARGS_03,
436 class ARGS_04,
437 class ARGS_05,
438 class ARGS_06,
439 class ARGS_07,
440 class ARGS_08,
441 class ARGS_09,
442 class ARGS_10>
443 LocalBufferedObject(bsl::allocator_arg_t ,
444 allocator_type allocator,
445 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
446 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
447 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
448 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
449 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
450 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
451 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
452 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
453 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
454 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10);
455#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_A >= 10
456
457#else
458// The generated code below is a workaround for the absence of perfect
459// forwarding in some compilers.
460 template <class... ARGS>
461 explicit LocalBufferedObject(
463
464 template <class... ARGS>
465 LocalBufferedObject(bsl::allocator_arg_t ,
466 allocator_type allocator,
468// }}} END GENERATED CODE
469#endif
470
471#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
472 /// Create the `value_type` object using the specified
473 /// @ref initializer_list and using the sequential allocator based on a
474 /// local stack buffer of (template parameter) `t_BUFFER_SIZE` size; if
475 /// local stack memory is exausted, use the default allocator to supply
476 /// additional heap memory.
477 template <class INIT_LIST_TYPE>
478 LocalBufferedObject(std::initializer_list<INIT_LIST_TYPE> il);
479
480 /// Create the `value_type` object using the specified
481 /// @ref initializer_list and using the sequential allocator based on a
482 /// local stack buffer of (template parameter) `t_BUFFER_SIZE` size; if
483 /// local stack memory is exausted, use the specified `allocator` to
484 /// supply additional heap memory.
485 template <class INIT_LIST_TYPE>
486 LocalBufferedObject(bsl::allocator_arg_t ,
487 allocator_type allocator,
488 std::initializer_list<INIT_LIST_TYPE> il);
489
490#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
491
492 /// Destroy this object and free any memory it uses, and if the
493 /// (template parameter) `t_DISABLE_DESTRUCTION` is `true`, do this
494 /// *without* calling the destructor of `value_type` (see
495 /// `t_DISABLE_DESTRUCTION` template parameter in the component doc).
497
498 // MANIPULATORS
499// {{{ BEGIN GENERATED CODE
500// The generated code below is a workaround for the absence of perfect
501// forwarding in some compilers.
502 template <class t_ANY_TYPE>
504 t_TYPE,
506 LocalBufferedObject>::type&
507 operator=(BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value);
508// }}} END GENERATED CODE
509
510 /// Return a pointer providing modifiable access to the underlying
511 /// `t_TYPE` object.
513
514 /// Return a reference providing modifiable access to the underlying
515 /// `t_TYPE` object.
517
518#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
519// {{{ BEGIN GENERATED CODE
520// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
521#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
522#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT 10
523#endif
524#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C
525#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
526#endif
527#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 0
528 void emplace();
529#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 0
530
531#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 1
532 template <class ARGS_01>
533 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01);
534#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 1
535
536#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 2
537 template <class ARGS_01,
538 class ARGS_02>
539 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
540 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02);
541#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 2
542
543#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 3
544 template <class ARGS_01,
545 class ARGS_02,
546 class ARGS_03>
547 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
548 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
549 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03);
550#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 3
551
552#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 4
553 template <class ARGS_01,
554 class ARGS_02,
555 class ARGS_03,
556 class ARGS_04>
557 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
558 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
559 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
560 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04);
561#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 4
562
563#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 5
564 template <class ARGS_01,
565 class ARGS_02,
566 class ARGS_03,
567 class ARGS_04,
568 class ARGS_05>
569 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
570 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
571 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
572 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
573 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05);
574#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 5
575
576#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 6
577 template <class ARGS_01,
578 class ARGS_02,
579 class ARGS_03,
580 class ARGS_04,
581 class ARGS_05,
582 class ARGS_06>
583 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
584 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
585 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
586 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
587 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
588 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06);
589#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 6
590
591#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 7
592 template <class ARGS_01,
593 class ARGS_02,
594 class ARGS_03,
595 class ARGS_04,
596 class ARGS_05,
597 class ARGS_06,
598 class ARGS_07>
599 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
600 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
601 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
602 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
603 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
604 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
605 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07);
606#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 7
607
608#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 8
609 template <class ARGS_01,
610 class ARGS_02,
611 class ARGS_03,
612 class ARGS_04,
613 class ARGS_05,
614 class ARGS_06,
615 class ARGS_07,
616 class ARGS_08>
617 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
618 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
619 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
620 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
621 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
622 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
623 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
624 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08);
625#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 8
626
627#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 9
628 template <class ARGS_01,
629 class ARGS_02,
630 class ARGS_03,
631 class ARGS_04,
632 class ARGS_05,
633 class ARGS_06,
634 class ARGS_07,
635 class ARGS_08,
636 class ARGS_09>
637 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
638 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
639 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
640 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
641 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
642 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
643 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
644 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
645 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09);
646#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 9
647
648#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 10
649 template <class ARGS_01,
650 class ARGS_02,
651 class ARGS_03,
652 class ARGS_04,
653 class ARGS_05,
654 class ARGS_06,
655 class ARGS_07,
656 class ARGS_08,
657 class ARGS_09,
658 class ARGS_10>
659 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
660 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
661 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
662 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
663 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
664 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
665 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
666 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
667 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
668 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10);
669#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_C >= 10
670
671#else
672// The generated code below is a workaround for the absence of perfect
673// forwarding in some compilers.
674 template <class... ARGS>
675 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args);
676// }}} END GENERATED CODE
677#endif
678
679#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
680 /// Destroy the `value_type` object unless `t_DISABLE_DESTRUCTION` is
681 /// true, then release all allocated memory, the re-construct a new
682 /// `value_type` object using the specified `il` and using the
683 /// sequential allocator based on the local stack buffer.
684 template <class INIT_LIST_TYPE>
685 void emplace(std::initializer_list<INIT_LIST_TYPE> il);
686
687#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
688
689 // ACCESSORS
690
691 /// Return a pointer providing const access to the underlying `t_TYPE`
692 /// object.
693 const value_type *operator->() const;
694
695 /// Return a reference providing const access to the underlying `t_TYPE`
696 /// object.
697 const value_type& operator*() const;
698
699 /// Return the alloctor passed at construction, used to provide heap
700 /// memory after the local stack buffer is exhausted. Note that this
701 /// is not the arena allocator contained in this object.
703};
704
705// ============================================================================
706// INLINE & TEMPLATE DEFINITIONS
707// ============================================================================
708
709 // -------------------
710 // LocalBufferedObject
711 // -------------------
712
713// PRIVATE MANIPULATORS
714template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
715inline
716void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
717 destroyHeldObject()
718{
719 if (!t_DISABLE_DESTRUCTION) {
720 d_object.address()->~value_type();
721 }
722}
723
724// CREATORS
725#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
726// {{{ BEGIN GENERATED CODE
727// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
728#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
729#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT 10
730#endif
731#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D
732#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
733#endif
734#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 0
735template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
736inline
737LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
738 LocalBufferedObject()
739: d_arenaAllocator()
740{
742 d_object.address(),
743 bslma::AllocatorUtil::adapt(&d_arenaAllocator));
744}
745#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 0
746
747#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 1
748template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
749template <class ARGS_01>
750inline
751LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
752 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01)
753: d_arenaAllocator()
754{
756 d_object.address(),
757 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
758 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01));
759}
760#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 1
761
762#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 2
763template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
764template <class ARGS_01,
765 class ARGS_02>
766inline
767LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
768 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
769 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02)
770: d_arenaAllocator()
771{
773 d_object.address(),
774 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
775 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
776 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02));
777}
778#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 2
779
780#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 3
781template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
782template <class ARGS_01,
783 class ARGS_02,
784 class ARGS_03>
785inline
786LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
787 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
788 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
789 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03)
790: d_arenaAllocator()
791{
793 d_object.address(),
794 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
795 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
796 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
797 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03));
798}
799#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 3
800
801#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 4
802template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
803template <class ARGS_01,
804 class ARGS_02,
805 class ARGS_03,
806 class ARGS_04>
807inline
808LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
809 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
810 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
811 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
812 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04)
813: d_arenaAllocator()
814{
816 d_object.address(),
817 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
818 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
819 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
820 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
821 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04));
822}
823#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 4
824
825#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 5
826template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
827template <class ARGS_01,
828 class ARGS_02,
829 class ARGS_03,
830 class ARGS_04,
831 class ARGS_05>
832inline
833LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
834 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
835 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
836 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
837 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
838 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05)
839: d_arenaAllocator()
840{
842 d_object.address(),
843 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
844 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
845 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
846 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
847 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
848 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05));
849}
850#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 5
851
852#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 6
853template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
854template <class ARGS_01,
855 class ARGS_02,
856 class ARGS_03,
857 class ARGS_04,
858 class ARGS_05,
859 class ARGS_06>
860inline
861LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
862 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
863 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
864 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
865 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
866 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
867 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06)
868: d_arenaAllocator()
869{
871 d_object.address(),
872 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
873 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
874 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
875 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
876 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
877 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
878 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06));
879}
880#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 6
881
882#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 7
883template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
884template <class ARGS_01,
885 class ARGS_02,
886 class ARGS_03,
887 class ARGS_04,
888 class ARGS_05,
889 class ARGS_06,
890 class ARGS_07>
891inline
892LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
893 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
894 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
895 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
896 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
897 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
898 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
899 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07)
900: d_arenaAllocator()
901{
903 d_object.address(),
904 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
905 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
906 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
907 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
908 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
909 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
910 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
911 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07));
912}
913#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 7
914
915#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 8
916template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
917template <class ARGS_01,
918 class ARGS_02,
919 class ARGS_03,
920 class ARGS_04,
921 class ARGS_05,
922 class ARGS_06,
923 class ARGS_07,
924 class ARGS_08>
925inline
926LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
927 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
928 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
929 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
930 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
931 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
932 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
933 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
934 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08)
935: d_arenaAllocator()
936{
938 d_object.address(),
939 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
940 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
941 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
942 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
943 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
944 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
945 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
946 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
947 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08));
948}
949#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 8
950
951#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 9
952template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
953template <class ARGS_01,
954 class ARGS_02,
955 class ARGS_03,
956 class ARGS_04,
957 class ARGS_05,
958 class ARGS_06,
959 class ARGS_07,
960 class ARGS_08,
961 class ARGS_09>
962inline
963LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
964 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
965 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
966 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
967 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
968 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
969 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
970 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
971 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
972 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09)
973: d_arenaAllocator()
974{
976 d_object.address(),
977 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
978 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
979 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
980 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
981 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
982 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
983 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
984 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
985 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08),
986 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, args_09));
987}
988#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 9
989
990#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 10
991template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
992template <class ARGS_01,
993 class ARGS_02,
994 class ARGS_03,
995 class ARGS_04,
996 class ARGS_05,
997 class ARGS_06,
998 class ARGS_07,
999 class ARGS_08,
1000 class ARGS_09,
1001 class ARGS_10>
1002inline
1003LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1004 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1005 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1006 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1007 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1008 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1009 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1010 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
1011 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
1012 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
1013 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10)
1014: d_arenaAllocator()
1015{
1017 d_object.address(),
1018 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1019 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1020 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1021 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1022 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1023 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1024 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1025 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
1026 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08),
1027 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, args_09),
1028 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, args_10));
1029}
1030#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 10
1031
1032
1033#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 0
1034template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1035inline
1036LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1037 LocalBufferedObject(bsl::allocator_arg_t ,
1038 bsl::allocator<> allocator)
1039: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1040{
1042 d_object.address(),
1043 bslma::AllocatorUtil::adapt(&d_arenaAllocator));
1044}
1045#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 0
1046
1047#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 1
1048template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1049template <class ARGS_01>
1050inline
1051LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1052 LocalBufferedObject(bsl::allocator_arg_t ,
1053 bsl::allocator<> allocator,
1054 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01)
1055: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1056{
1058 d_object.address(),
1059 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1060 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01));
1061}
1062#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 1
1063
1064#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 2
1065template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1066template <class ARGS_01,
1067 class ARGS_02>
1068inline
1069LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1070 LocalBufferedObject(bsl::allocator_arg_t ,
1071 bsl::allocator<> allocator,
1072 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1073 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02)
1074: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1075{
1077 d_object.address(),
1078 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1079 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1080 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02));
1081}
1082#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 2
1083
1084#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 3
1085template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1086template <class ARGS_01,
1087 class ARGS_02,
1088 class ARGS_03>
1089inline
1090LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1091 LocalBufferedObject(bsl::allocator_arg_t ,
1092 bsl::allocator<> allocator,
1093 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1094 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1095 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03)
1096: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1097{
1099 d_object.address(),
1100 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1101 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1102 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1103 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03));
1104}
1105#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 3
1106
1107#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 4
1108template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1109template <class ARGS_01,
1110 class ARGS_02,
1111 class ARGS_03,
1112 class ARGS_04>
1113inline
1114LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1115 LocalBufferedObject(bsl::allocator_arg_t ,
1116 bsl::allocator<> allocator,
1117 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1118 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1119 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1120 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04)
1121: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1122{
1124 d_object.address(),
1125 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1126 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1127 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1128 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1129 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04));
1130}
1131#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 4
1132
1133#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 5
1134template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1135template <class ARGS_01,
1136 class ARGS_02,
1137 class ARGS_03,
1138 class ARGS_04,
1139 class ARGS_05>
1140inline
1141LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1142 LocalBufferedObject(bsl::allocator_arg_t ,
1143 bsl::allocator<> allocator,
1144 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1145 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1146 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1147 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1148 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05)
1149: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1150{
1152 d_object.address(),
1153 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1154 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1155 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1156 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1157 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1158 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05));
1159}
1160#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 5
1161
1162#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 6
1163template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1164template <class ARGS_01,
1165 class ARGS_02,
1166 class ARGS_03,
1167 class ARGS_04,
1168 class ARGS_05,
1169 class ARGS_06>
1170inline
1171LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1172 LocalBufferedObject(bsl::allocator_arg_t ,
1173 bsl::allocator<> allocator,
1174 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1175 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1176 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1177 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1178 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1179 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06)
1180: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1181{
1183 d_object.address(),
1184 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1185 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1186 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1187 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1188 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1189 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1190 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06));
1191}
1192#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 6
1193
1194#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 7
1195template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1196template <class ARGS_01,
1197 class ARGS_02,
1198 class ARGS_03,
1199 class ARGS_04,
1200 class ARGS_05,
1201 class ARGS_06,
1202 class ARGS_07>
1203inline
1204LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1205 LocalBufferedObject(bsl::allocator_arg_t ,
1206 bsl::allocator<> allocator,
1207 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1208 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1209 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1210 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1211 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1212 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1213 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07)
1214: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1215{
1217 d_object.address(),
1218 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1219 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1220 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1221 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1222 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1223 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1224 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1225 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07));
1226}
1227#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 7
1228
1229#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 8
1230template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1231template <class ARGS_01,
1232 class ARGS_02,
1233 class ARGS_03,
1234 class ARGS_04,
1235 class ARGS_05,
1236 class ARGS_06,
1237 class ARGS_07,
1238 class ARGS_08>
1239inline
1240LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1241 LocalBufferedObject(bsl::allocator_arg_t ,
1242 bsl::allocator<> allocator,
1243 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1244 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1245 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1246 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1247 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1248 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1249 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
1250 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08)
1251: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1252{
1254 d_object.address(),
1255 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1256 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1257 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1258 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1259 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1260 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1261 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1262 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
1263 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08));
1264}
1265#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 8
1266
1267#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 9
1268template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1269template <class ARGS_01,
1270 class ARGS_02,
1271 class ARGS_03,
1272 class ARGS_04,
1273 class ARGS_05,
1274 class ARGS_06,
1275 class ARGS_07,
1276 class ARGS_08,
1277 class ARGS_09>
1278inline
1279LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1280 LocalBufferedObject(bsl::allocator_arg_t ,
1281 bsl::allocator<> allocator,
1282 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1283 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1284 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1285 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1286 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1287 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1288 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
1289 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
1290 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09)
1291: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1292{
1294 d_object.address(),
1295 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1296 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1297 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1298 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1299 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1300 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1301 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1302 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
1303 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08),
1304 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, args_09));
1305}
1306#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 9
1307
1308#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 10
1309template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1310template <class ARGS_01,
1311 class ARGS_02,
1312 class ARGS_03,
1313 class ARGS_04,
1314 class ARGS_05,
1315 class ARGS_06,
1316 class ARGS_07,
1317 class ARGS_08,
1318 class ARGS_09,
1319 class ARGS_10>
1320inline
1321LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1322 LocalBufferedObject(bsl::allocator_arg_t ,
1323 bsl::allocator<> allocator,
1324 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1325 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1326 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1327 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1328 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1329 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1330 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
1331 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
1332 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
1333 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10)
1334: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1335{
1337 d_object.address(),
1338 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1339 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1340 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1341 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1342 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1343 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1344 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1345 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
1346 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08),
1347 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, args_09),
1348 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, args_10));
1349}
1350#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_D >= 10
1351
1352#else
1353// The generated code below is a workaround for the absence of perfect
1354// forwarding in some compilers.
1355template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1356template <class... ARGS>
1357inline
1358LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1359 LocalBufferedObject(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args)
1360: d_arenaAllocator()
1361{
1363 d_object.address(),
1364 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1365 BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
1366}
1367
1368template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1369template <class... ARGS>
1370inline
1371LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1372 LocalBufferedObject(bsl::allocator_arg_t ,
1373 bsl::allocator<> allocator,
1375: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1376{
1378 d_object.address(),
1379 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1380 BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
1381}
1382// }}} END GENERATED CODE
1383#endif
1384
1385#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1386template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1387template <class INIT_LIST_TYPE>
1388inline
1389LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1390 LocalBufferedObject(std::initializer_list<INIT_LIST_TYPE> il)
1391: d_arenaAllocator()
1392{
1394 d_object.address(),
1395 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1396 il);
1397}
1398
1399template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1400template <class INIT_LIST_TYPE>
1401inline
1402LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1403 LocalBufferedObject(bsl::allocator_arg_t ,
1404 bsl::allocator<> allocator,
1405 std::initializer_list<INIT_LIST_TYPE> il)
1406: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
1407{
1409 d_object.address(),
1410 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1411 il);
1412}
1413#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
1414
1415template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1416inline
1417LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1418 ~LocalBufferedObject()
1419{
1420 destroyHeldObject();
1421}
1422
1423// MANIPULATORS
1424// {{{ BEGIN GENERATED CODE
1425// The generated code below is a workaround for the absence of perfect
1426// forwarding in some compilers.
1427template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1428template <class t_ANY_TYPE>
1429typename bsl::enable_if<
1431 t_TYPE,
1433 LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION> >::type&
1434LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::operator=(
1435 BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value)
1436{
1437 d_object.object() = BSLS_COMPILERFEATURES_FORWARD(t_ANY_TYPE, value);
1438
1439 return *this;
1440}
1441// }}} END GENERATED CODE
1442
1443template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1444inline
1445t_TYPE *LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1446 operator->()
1447{
1448 return d_object.address();
1449}
1450
1451template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1452inline
1453t_TYPE& LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1454 operator*()
1455{
1456 return d_object.object();
1457}
1458
1459#if BSLS_COMPILERFEATURES_SIMULATE_VARIADIC_TEMPLATES
1460// {{{ BEGIN GENERATED CODE
1461// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
1462#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
1463#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT 10
1464#endif
1465#ifndef BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F
1466#define BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT
1467#endif
1468#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 0
1469template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1470void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1471 emplace()
1472{
1473 destroyHeldObject();
1474 d_arenaAllocator.release();
1476 d_object.address(),
1477 bslma::AllocatorUtil::adapt(&d_arenaAllocator));
1478}
1479#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 0
1480
1481#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 1
1482template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1483template <class ARGS_01>
1484void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1485 emplace(
1486 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01)
1487{
1488 destroyHeldObject();
1489 d_arenaAllocator.release();
1491 d_object.address(),
1492 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1493 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01));
1494}
1495#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 1
1496
1497#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 2
1498template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1499template <class ARGS_01,
1500 class ARGS_02>
1501void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1502 emplace(
1503 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1504 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02)
1505{
1506 destroyHeldObject();
1507 d_arenaAllocator.release();
1509 d_object.address(),
1510 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1511 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1512 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02));
1513}
1514#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 2
1515
1516#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 3
1517template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1518template <class ARGS_01,
1519 class ARGS_02,
1520 class ARGS_03>
1521void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1522 emplace(
1523 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1524 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1525 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03)
1526{
1527 destroyHeldObject();
1528 d_arenaAllocator.release();
1530 d_object.address(),
1531 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1532 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1533 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1534 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03));
1535}
1536#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 3
1537
1538#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 4
1539template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1540template <class ARGS_01,
1541 class ARGS_02,
1542 class ARGS_03,
1543 class ARGS_04>
1544void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1545 emplace(
1546 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1547 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1548 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1549 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04)
1550{
1551 destroyHeldObject();
1552 d_arenaAllocator.release();
1554 d_object.address(),
1555 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1556 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1557 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1558 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1559 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04));
1560}
1561#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 4
1562
1563#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 5
1564template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1565template <class ARGS_01,
1566 class ARGS_02,
1567 class ARGS_03,
1568 class ARGS_04,
1569 class ARGS_05>
1570void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1571 emplace(
1572 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1573 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1574 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1575 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1576 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05)
1577{
1578 destroyHeldObject();
1579 d_arenaAllocator.release();
1581 d_object.address(),
1582 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1583 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1584 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1585 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1586 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1587 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05));
1588}
1589#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 5
1590
1591#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 6
1592template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1593template <class ARGS_01,
1594 class ARGS_02,
1595 class ARGS_03,
1596 class ARGS_04,
1597 class ARGS_05,
1598 class ARGS_06>
1599void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1600 emplace(
1601 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1602 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1603 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1604 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1605 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1606 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06)
1607{
1608 destroyHeldObject();
1609 d_arenaAllocator.release();
1611 d_object.address(),
1612 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1613 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1614 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1615 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1616 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1617 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1618 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06));
1619}
1620#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 6
1621
1622#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 7
1623template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1624template <class ARGS_01,
1625 class ARGS_02,
1626 class ARGS_03,
1627 class ARGS_04,
1628 class ARGS_05,
1629 class ARGS_06,
1630 class ARGS_07>
1631void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1632 emplace(
1633 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1634 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1635 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1636 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1637 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1638 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1639 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07)
1640{
1641 destroyHeldObject();
1642 d_arenaAllocator.release();
1644 d_object.address(),
1645 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1646 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1647 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1648 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1649 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1650 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1651 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1652 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07));
1653}
1654#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 7
1655
1656#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 8
1657template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1658template <class ARGS_01,
1659 class ARGS_02,
1660 class ARGS_03,
1661 class ARGS_04,
1662 class ARGS_05,
1663 class ARGS_06,
1664 class ARGS_07,
1665 class ARGS_08>
1666void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1667 emplace(
1668 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1669 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1670 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1671 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1672 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1673 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1674 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
1675 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08)
1676{
1677 destroyHeldObject();
1678 d_arenaAllocator.release();
1680 d_object.address(),
1681 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1682 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1683 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1684 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1685 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1686 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1687 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1688 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
1689 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08));
1690}
1691#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 8
1692
1693#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 9
1694template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1695template <class ARGS_01,
1696 class ARGS_02,
1697 class ARGS_03,
1698 class ARGS_04,
1699 class ARGS_05,
1700 class ARGS_06,
1701 class ARGS_07,
1702 class ARGS_08,
1703 class ARGS_09>
1704void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1705 emplace(
1706 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1707 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1708 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1709 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1710 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1711 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1712 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
1713 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
1714 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09)
1715{
1716 destroyHeldObject();
1717 d_arenaAllocator.release();
1719 d_object.address(),
1720 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1721 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1722 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1723 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1724 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1725 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1726 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1727 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
1728 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08),
1729 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, args_09));
1730}
1731#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 9
1732
1733#if BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 10
1734template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1735template <class ARGS_01,
1736 class ARGS_02,
1737 class ARGS_03,
1738 class ARGS_04,
1739 class ARGS_05,
1740 class ARGS_06,
1741 class ARGS_07,
1742 class ARGS_08,
1743 class ARGS_09,
1744 class ARGS_10>
1745void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1746 emplace(
1747 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_01) args_01,
1748 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_02) args_02,
1749 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_03) args_03,
1750 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_04) args_04,
1751 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_05) args_05,
1752 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_06) args_06,
1753 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_07) args_07,
1754 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_08) args_08,
1755 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_09) args_09,
1756 BSLS_COMPILERFEATURES_FORWARD_REF(ARGS_10) args_10)
1757{
1758 destroyHeldObject();
1759 d_arenaAllocator.release();
1761 d_object.address(),
1762 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1763 BSLS_COMPILERFEATURES_FORWARD(ARGS_01, args_01),
1764 BSLS_COMPILERFEATURES_FORWARD(ARGS_02, args_02),
1765 BSLS_COMPILERFEATURES_FORWARD(ARGS_03, args_03),
1766 BSLS_COMPILERFEATURES_FORWARD(ARGS_04, args_04),
1767 BSLS_COMPILERFEATURES_FORWARD(ARGS_05, args_05),
1768 BSLS_COMPILERFEATURES_FORWARD(ARGS_06, args_06),
1769 BSLS_COMPILERFEATURES_FORWARD(ARGS_07, args_07),
1770 BSLS_COMPILERFEATURES_FORWARD(ARGS_08, args_08),
1771 BSLS_COMPILERFEATURES_FORWARD(ARGS_09, args_09),
1772 BSLS_COMPILERFEATURES_FORWARD(ARGS_10, args_10));
1773}
1774#endif // BDLMA_LOCALBUFFEREDOBJECT_VARIADIC_LIMIT_F >= 10
1775
1776#else
1777// The generated code below is a workaround for the absence of perfect
1778// forwarding in some compilers.
1779template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1780template <class... ARGS>
1781void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1782 emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args)
1783{
1784 destroyHeldObject();
1785 d_arenaAllocator.release();
1787 d_object.address(),
1788 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1789 BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
1790}
1791// }}} END GENERATED CODE
1792#endif
1793
1794#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1795template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1796template <class INIT_LIST_TYPE>
1797void LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1798 emplace(std::initializer_list<INIT_LIST_TYPE> il)
1799{
1800 destroyHeldObject();
1801 d_arenaAllocator.release();
1803 d_object.address(),
1804 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
1805 il);
1806}
1807#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
1808
1809// ACCESSORS
1810template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1811inline
1812const t_TYPE *
1813LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1814 operator->() const
1815{
1816 return d_object.address();
1817}
1818
1819template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1820inline
1821const t_TYPE&
1822LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1823 operator*() const
1824{
1825 return d_object.object();
1826}
1827
1828template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
1829inline
1831LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
1832 get_allocator() const
1833{
1834 return allocator_type(d_arenaAllocator.allocator());
1835}
1836
1837#undef BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE
1838
1839} // close package namespace
1840
1841
1842#else // if ! defined(DEFINED_BDLMA_LOCALBUFFEREDOBJECT_H)
1843# error Not valid except when included from bdlma_localbufferedobject.h
1844#endif // ! defined(COMPILING_BDLMA_LOCALBUFFEREDOBJECT_H)
1845
1846#endif // ! defined(INCLUDED_BDLMA_LOCALBUFFEREDOBJECT_CPP03)
1847
1848// ----------------------------------------------------------------------------
1849// Copyright 2024 Bloomberg Finance L.P.
1850//
1851// Licensed under the Apache License, Version 2.0 (the "License");
1852// you may not use this file except in compliance with the License.
1853// You may obtain a copy of the License at
1854//
1855// http://www.apache.org/licenses/LICENSE-2.0
1856//
1857// Unless required by applicable law or agreed to in writing, software
1858// distributed under the License is distributed on an "AS IS" BASIS,
1859// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1860// See the License for the specific language governing permissions and
1861// limitations under the License.
1862// ----------------------------- END-OF-FILE ----------------------------------
1863
1864/** @} */
1865/** @} */
1866/** @} */
#define BSLMF_NESTED_TRAIT_DECLARATION(t_TYPE, t_TRAIT)
Definition bslmf_nestedtraitdeclaration.h:231
bslma::Allocator * allocator() const
Return the allocator passed at construction.
Definition bdlma_bufferedsequentialallocator.h:531
void release() BSLS_KEYWORD_OVERRIDE
Definition bdlma_bufferedsequentialallocator.h:518
t_TYPE value_type
Definition bdlma_localbufferedobject.h:267
value_type & operator*()
Definition bdlma_localbufferedobject.h:517
~LocalBufferedObject()
Definition bdlma_localbufferedobject.h:482
allocator_type get_allocator() const
Definition bdlma_localbufferedobject.h:575
value_type * operator->()
Definition bdlma_localbufferedobject.h:509
void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args)
Definition bdlma_localbufferedobject.h:526
bsl::allocator allocator_type
Definition bdlma_localbufferedobject.h:268
@ k_BUFFER_SIZE
Definition bdlma_localbufferedobject.h:270
Definition bdlma_localsequentialallocator.h:230
Definition bslma_bslallocator.h:580
#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC)
Definition bdlma_localbufferedobject.h:236
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:229
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2012
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2018
#define BSLS_KEYWORD_DELETED
Definition bsls_keyword.h:609
Definition bdlma_alignedallocator.h:276
Definition balxml_encoderoptions.h:68
Definition bslmf_enableif.h:525
static bsl::enable_if<!IsDerivedFromBslAllocator< t_ALLOC >::value, t_ALLOC >::type adapt(const t_ALLOC &from)
Definition bslma_allocatorutil.h:856
static void construct(TARGET_TYPE *address, const ALLOCATOR &allocator)
Definition bslma_constructionutil.h:1243
Definition bslma_usesbslmaallocator.h:343
Definition bsls_objectbuffer.h:276
TYPE * address()
Definition bsls_objectbuffer.h:334
TYPE & object()
Definition bsls_objectbuffer.h:351