BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdlma_localbufferedobject.h
Go to the documentation of this file.
1/// @file bdlma_localbufferedobject.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bdlma_localbufferedobject.h -*-C++-*-
8#ifndef INCLUDED_BDLMA_LOCALBUFFEREDOBJECT
9#define INCLUDED_BDLMA_LOCALBUFFEREDOBJECT
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id: $")
13
14/// @defgroup bdlma_localbufferedobject bdlma_localbufferedobject
15/// @brief Provide easy way to create an object with a local arena allocator.
16/// @addtogroup bdl
17/// @{
18/// @addtogroup bdlma
19/// @{
20/// @addtogroup bdlma_localbufferedobject
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bdlma_localbufferedobject-purpose"> Purpose</a>
25/// * <a href="#bdlma_localbufferedobject-classes"> Classes </a>
26/// * <a href="#bdlma_localbufferedobject-description"> Description </a>
27/// * <a href="#bdlma_localbufferedobject-t_disable_destruction-template-parameter"> t_DISABLE_DESTRUCTION Template Parameter: </a>
28/// * <a href="#bdlma_localbufferedobject-emplace-manipulators"> emplace Manipulators: </a>
29/// * <a href="#bdlma_localbufferedobject-usage"> Usage </a>
30/// * <a href="#bdlma_localbufferedobject-example-1-configuring-an-object-to-allocate-from-stack-memory"> Example 1: Configuring an Object to Allocate From Stack Memory </a>
31/// * <a href="#bdlma_localbufferedobject-example-2-eliding-the-destructor"> Example 2: Eliding the Destructor </a>
32///
33/// # Purpose {#bdlma_localbufferedobject-purpose}
34/// Provide easy way to create an object with a local arena allocator.
35///
36/// # Classes {#bdlma_localbufferedobject-classes}
37///
38/// - bdlma::LocalBufferedObject: object with a local-arena allocator
39///
40/// @see bdlma_localsequentialalallocator
41///
42/// # Description {#bdlma_localbufferedobject-description}
43/// This component provides a mechanism, `LocalBufferedObject`,
44/// that contains a single instance of an allocator-aware object instantiated
45/// using an arena allocator that will allocate from "local" memory. This type
46/// is primarily used to simplify the creation of temporary objects utilizing a
47/// local memory buffer (typically on the stack) for efficiency, and is
48/// equivalent to creating a temporary object and supplying it a
49/// `bdlma::LocalSequentialAllocator`. There are three template parameters --
50/// the type of object contained, the size in bytes of the buffer in the local
51/// arena allocator, and a `bool` to indicate whether destruction of the
52/// contained object is to be disabled during `emplace` and destruction of the
53/// mechansim. If the buffer used by the local arena allocator is exhausted,
54/// subsequent allocations come from the allocator passed at construction, or
55/// the default allocator if no allocator was passed at construction. Note that
56/// calls to `deallocate` by the held object are ignored.
57///
58/// The container has 4 types of constructors:
59/// 1. A constructor that takes an arbitary set of arguments, propagated to the
60/// object.
61/// 2. A constructor like `1` above, but also passed an allocator.
62/// 3. A constructor that takes a `std::initializer_list`, propagated to the
63/// object.
64/// 4. A constructor like `3` above, but also passed an allocator.
65///
66/// ## t_DISABLE_DESTRUCTION Template Parameter: {#bdlma_localbufferedobject-t_disable_destruction-template-parameter}
67///
68///
69/// If `t_DISABLE_DESTRUCTOR` is set to `true`, the `LocalBufferedObject`, upon
70/// destruction or `emplace`, will *not* destroy the contained object but will
71/// instead simply release any allocated memory. Eliding the contained objects
72/// destructor may improve efficiency, but is safe only if the contained object
73/// does not manage resources other than memory. I.e., it is unsafe to set
74/// `t_DISABLE_DESTRUCTOR` to `true` if the contained object manages resources
75/// other than memory (e.g., file handles, locks). By default
76/// `t_DISABLE_DESTRUCTOR` is `false`.
77///
78/// It is important that `t_DISABLE_DESTRUCTION` be set to `false` (the default)
79/// if any resources other than memory, such as file handles or mutexes, are
80/// managed by the held object.
81///
82/// ## emplace Manipulators: {#bdlma_localbufferedobject-emplace-manipulators}
83///
84///
85/// The `class` has two `emplace` manipulators,
86/// * One taking an arbitraty set of arguments to be propagated to the
87/// contained objects constructor.
88/// * One taking a `std::initializer_list`.
89///
90/// ## Usage {#bdlma_localbufferedobject-usage}
91///
92///
93///
94/// ### Example 1: Configuring an Object to Allocate From Stack Memory {#bdlma_localbufferedobject-example-1-configuring-an-object-to-allocate-from-stack-memory}
95///
96///
97/// Suppose we have an array of `bsl::string_view`s containing names, with a
98/// large number of redundant entries, and we want to count how many unique
99/// names exist in the array. We write a function `countUniqueNames` which
100/// stores the names in an unordered set, and yields the `size` accessor as the
101/// total count of unique names.
102///
103/// The function will be called many times, and `bsl::unordered_set` does a
104/// large number of small memory allocations. These allocations would be faster
105/// if they came from a non-freeing allocator that gets its memory from a buffer
106/// on the stack.
107///
108/// We can use a `LocalBufferedObject` to create an `unordered_set` with an
109/// 8192-byte stack buffer from which it is to allocate memory.
110/// @code
111/// size_t countUniqueNames(const bsl::string_view *rawNames,
112/// size_t numRawNames)
113/// {
114/// bdlma::LocalBufferedObject<bsl::unordered_set<bsl::string_view>,
115/// 8192> uset;
116///
117/// for (unsigned uu = 0; uu < numRawNames; ++uu) {
118/// uset->insert(rawNames[uu]);
119/// }
120///
121/// return uset->size();
122/// }
123/// @endcode
124/// Notice that this syntactic convenience equivalent to supplying a local
125/// `LocalSequentialAllocator` to the `bsl::unordered_set`.
126///
127/// Below we show the allocation behavior of this function as the number of
128/// items in the `unordered_set` increases. Note that when the memory in the
129/// 8192-byte stack buffer is exhausted, further memory comes from the default
130/// allocator:
131/// @code
132/// 'countUniqueNames':
133/// Names: (raw: 25, unique: 23), used default allocator: 0
134/// Names: (raw: 50, unique: 42), used default allocator: 0
135/// Names: (raw: 100, unique: 70), used default allocator: 0
136/// Names: (raw: 200, unique: 103), used default allocator: 0
137/// Names: (raw: 400, unique: 130), used default allocator: 1
138/// Names: (raw: 800, unique: 143), used default allocator: 1
139/// Names: (raw: 1600, unique: 144), used default allocator: 1
140/// @endcode
141///
142/// ### Example 2: Eliding the Destructor {#bdlma_localbufferedobject-example-2-eliding-the-destructor}
143///
144///
145/// Because the only resource managed by the `unordered_set` is memory, we can
146/// improve the performance of the previous example using the template's boolean
147/// `t_DISABLE_DESTRUCTOR` parameter.
148///
149/// `unordered_set` allocates a lot of small nodes, and when the container is
150/// destroyed, unordered set's destructor traverses the whole data structure,
151/// visting every node and calling `bslma::Allocator::deallocate` on each one,
152/// which is a non-inline virtual function call eventually handled by the
153/// sequential allocator's `deallocate` function, which does nothing.
154///
155/// If we set the 3rd template parameter of `LocalBufferedObject`, which is
156/// `t_DISABLE_DESTRUCTION` of type `bool`, to the non-default value of `true`,
157/// the `LocalBufferedObject` will not call the destructor of the held
158/// `unordered_set`. This isn't a problem because unordered set manages no
159/// resource other than memory, and all the memory it uses is managed by the
160/// local sequential allocator contained in the local buffered object.
161/// @code
162/// size_t countUniqueNamesFaster(const bsl::string_view *rawNames,
163/// size_t numRawNames)
164/// {
165/// bdlma::LocalBufferedObject<bsl::unordered_set<bsl::string_view>,
166/// 8192,
167/// true> uset;
168///
169/// for (unsigned uu = 0; uu < numRawNames; ++uu) {
170/// uset->insert(rawNames[uu]);
171/// }
172///
173/// return uset->size();
174/// }
175/// @endcode
176/// And we see the calculations are exactly the same:
177/// @code
178/// 'countUniqueNamesFaster': destructor disabled:
179/// Names: (raw: 25, unique: 23), used default allocator: 0
180/// Names: (raw: 50, unique: 42), used default allocator: 0
181/// Names: (raw: 100, unique: 70), used default allocator: 0
182/// Names: (raw: 200, unique: 103), used default allocator: 0
183/// Names: (raw: 400, unique: 130), used default allocator: 1
184/// Names: (raw: 800, unique: 143), used default allocator: 1
185/// Names: (raw: 1600, unique: 144), used default allocator: 1
186/// @endcode
187/// @}
188/** @} */
189/** @} */
190
191/** @addtogroup bdl
192 * @{
193 */
194/** @addtogroup bdlma
195 * @{
196 */
197/** @addtogroup bdlma_localbufferedobject
198 * @{
199 */
200
201#include <bdlscm_version.h>
202
204
205#include <bslma_allocatorutil.h>
206#include <bslma_bslallocator.h>
209
210#include <bslmf_assert.h>
212#include <bslmf_util.h> // 'forward(V)' for C++03
213
215#include <bsls_keyword.h>
216#include <bsls_objectbuffer.h>
217#include <bsls_util.h> // 'forward<T>(V)' for C++11
218
219#include <bsl_type_traits.h>
220
221#ifdef BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
222# include <initializer_list>
223#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
224
225#include <bsl_cstddef.h> // size_t
226#include <bsl_utility.h>
227
228#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
229// clang-format off
230// Include version that can be compiled with C++03
231// Generated on Mon Jan 13 08:32:13 2025
232// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
233
234# define COMPILING_BDLMA_LOCALBUFFEREDOBJECT_H
236# undef COMPILING_BDLMA_LOCALBUFFEREDOBJECT_H
237
238// clang-format on
239#else
240
241#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
242#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC) \
243 std::is_assignable<DST, SRC>::value
244#else
245#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC) true
246#endif
247
248
249namespace bdlma {
250
251 // =========================
252 // class LocalBufferedObject
253 // =========================
254
255/// This `class` contains an object of type `t_TYPE` and a local sequential
256/// allocator with an arena size of `t_BUFFER_SIZE`, from which the `t_TYPE`
257/// object allocates memory, in a single object. The
258/// `t_DISABLE_DESTRUCTION` template parameter can be used to prevent this
259/// `class` from calling `~t_TYPE()` in cases where it is known that
260/// `t_TYPE` manages no resources other than memory, since the memory will
261/// be adequately managed by the local sequential allocator.
262///
263/// See @ref bdlma_localbufferedobject
264template <class t_TYPE,
265 bsl::size_t t_BUFFER_SIZE = 1024,
266 bool t_DISABLE_DESTRUCTION = false>
268
270
271 public:
272 // PUBLIC TYPES
273 typedef t_TYPE value_type;
275
276 enum { k_BUFFER_SIZE = t_BUFFER_SIZE }; // The `size` template
277 // parameter to `LocalAllocator`
278 // takes an `int`, not `size_t`.
279
280 private:
281 // DATA
284
285 private:
286 // NOT IMPLEMENTED
290
291 // PRIVATE MANIPULATORS
292
293 /// Call `d_arenaAllocator.release()`. If `t_DISABLE_DESTRUCTION` is
294 /// `false`, destroy the held object first.
295 void destroyHeldObject();
296
297 public:
298 // TRAITS
300 BloombergLP::bslmf::UsesAllocatorArgT);
301
302 // CREATORS
303#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
304 /// Create a `value_type` object using the specified `args` that will
305 /// allocate memory from a sequential allocator based on a local stack
306 /// buffer of (template parameter) `t_BUFFER_SIZE` size; if local stack
307 /// memory is exhausted, use the default allocator to supply additional
308 /// heap memory.
309 template <class... ARGS>
310 explicit LocalBufferedObject(
312
313 /// Create a `value_type` object using the specified `args` that will
314 /// allocate memory from a sequential allocator based on a local stack
315 /// buffer of (template parameter) `t_BUFFER_SIZE` size; if local stack
316 /// memory is exhausted, use the specified `allocator` to supply
317 /// additional heap memory.
318 template <class... ARGS>
320 allocator_type allocator,
322#endif
323
324#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
325 /// Create the `value_type` object using the specified
326 /// @ref initializer_list and using the sequential allocator based on a
327 /// local stack buffer of (template parameter) `t_BUFFER_SIZE` size; if
328 /// local stack memory is exausted, use the default allocator to supply
329 /// additional heap memory.
330 template <class INIT_LIST_TYPE>
331 LocalBufferedObject(std::initializer_list<INIT_LIST_TYPE> il);
332
333 /// Create the `value_type` object using the specified
334 /// @ref initializer_list and using the sequential allocator based on a
335 /// local stack buffer of (template parameter) `t_BUFFER_SIZE` size; if
336 /// local stack memory is exausted, use the specified `allocator` to
337 /// supply additional heap memory.
338 template <class INIT_LIST_TYPE>
340 allocator_type allocator,
341 std::initializer_list<INIT_LIST_TYPE> il);
342
343#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
344
345 /// Destroy this object and free any memory it uses, and if the
346 /// (template parameter) `t_DISABLE_DESTRUCTION` is `true`, do this
347 /// *without* calling the destructor of `value_type` (see
348 /// `t_DISABLE_DESTRUCTION` template parameter in the component doc).
350
351 // MANIPULATORS
352#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
353 /// Assign the object held by this container to the specified `value`.
354 template <class t_ANY_TYPE>
356 t_TYPE,
358 LocalBufferedObject>::type&
359 operator=(BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value);
360#endif
361
362 /// Return a pointer providing modifiable access to the underlying
363 /// `t_TYPE` object.
365
366 /// Return a reference providing modifiable access to the underlying
367 /// `t_TYPE` object.
369
370#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
371 /// Destroy the `value_type` object unless `t_DISABLE_DESTRUCTION` is
372 /// true, then release all allocated memory, the re-construct a new
373 /// `value_type` object using the specified `args` and using the
374 /// sequential allocator based on the local stack buffer.
375 template <class... ARGS>
376 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args);
377#endif
378
379#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
380 /// Destroy the `value_type` object unless `t_DISABLE_DESTRUCTION` is
381 /// true, then release all allocated memory, the re-construct a new
382 /// `value_type` object using the specified `il` and using the
383 /// sequential allocator based on the local stack buffer.
384 template <class INIT_LIST_TYPE>
385 void emplace(std::initializer_list<INIT_LIST_TYPE> il);
386
387#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
388
389 // ACCESSORS
390
391 /// Return a pointer providing const access to the underlying `t_TYPE`
392 /// object.
393 const value_type *operator->() const;
394
395 /// Return a reference providing const access to the underlying `t_TYPE`
396 /// object.
397 const value_type& operator*() const;
398
399 /// Return the alloctor passed at construction, used to provide heap memory after the local stack buffer is exhausted.
400 ///
401 /// \note Note that this
402 /// is not the arena allocator contained in this object.
404};
405
406// ============================================================================
407// INLINE & TEMPLATE DEFINITIONS
408// ============================================================================
409
410 // -------------------
411 // LocalBufferedObject
412 // -------------------
413
414// PRIVATE MANIPULATORS
415template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
416inline
419{
420 if (!t_DISABLE_DESTRUCTION) {
421 d_object.address()->~value_type();
422 }
423}
424
425// CREATORS
426#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
427template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
428template <class... ARGS>
429inline
439
440template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
441template <class... ARGS>
442inline
445 bsl::allocator<> allocator,
447: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
448{
450 d_object.address(),
451 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
452 BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
453}
454#endif
455
456#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
457template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
458template <class INIT_LIST_TYPE>
459inline
461 LocalBufferedObject(std::initializer_list<INIT_LIST_TYPE> il)
462: d_arenaAllocator()
463{
465 d_object.address(),
466 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
467 il);
468}
469
470template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
471template <class INIT_LIST_TYPE>
472inline
473LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
474 LocalBufferedObject(bsl::allocator_arg_t ,
475 bsl::allocator<> allocator,
476 std::initializer_list<INIT_LIST_TYPE> il)
477: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
478{
480 d_object.address(),
481 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
482 il);
483}
484#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
485
486template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
487inline
493
494// MANIPULATORS
495#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
496/// Assign the object held by this container to the specified `value`.
497template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
498template <class t_ANY_TYPE>
499typename bsl::enable_if<
501 t_TYPE,
511#endif
512
513template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
514inline
520
521template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
522inline
528
529#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
530template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
531template <class... ARGS>
534{
535 destroyHeldObject();
536 d_arenaAllocator.release();
538 d_object.address(),
539 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
540 BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
541}
542#endif
543
544#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
545template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
546template <class INIT_LIST_TYPE>
548 emplace(std::initializer_list<INIT_LIST_TYPE> il)
549{
550 destroyHeldObject();
551 d_arenaAllocator.release();
553 d_object.address(),
554 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
555 il);
556}
557#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
558
559// ACCESSORS
560template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
561inline
562const t_TYPE *
568
569template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
570inline
571const t_TYPE&
577
578template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
579inline
586
587#undef BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE
588
589} // close package namespace
590
591
592#endif // End C++11 code
593
594#endif // ifndef INCLUDED_BDLMA_LOCALBUFFEREDOBJECT
595
596// ----------------------------------------------------------------------------
597// Copyright 2024 Bloomberg Finance L.P.
598//
599// Licensed under the Apache License, Version 2.0 (the "License");
600// you may not use this file except in compliance with the License.
601// You may obtain a copy of the License at
602//
603// http://www.apache.org/licenses/LICENSE-2.0
604//
605// Unless required by applicable law or agreed to in writing, software
606// distributed under the License is distributed on an "AS IS" BASIS,
607// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
608// See the License for the specific language governing permissions and
609// limitations under the License.
610// ----------------------------- END-OF-FILE ----------------------------------
611
612/** @} */
613/** @} */
614/** @} */
bslma::Allocator * allocator() const
Return the allocator passed at construction.
Definition bdlma_bufferedsequentialallocator.h:537
void release() BSLS_KEYWORD_OVERRIDE
Definition bdlma_bufferedsequentialallocator.h:524
Definition bdlma_localbufferedobject.h:267
BSLMF_NESTED_TRAIT_DECLARATION(LocalBufferedObject, BloombergLP::bslmf::UsesAllocatorArgT)
t_TYPE value_type
Definition bdlma_localbufferedobject.h:273
value_type & operator*()
Definition bdlma_localbufferedobject.h:524
~LocalBufferedObject()
Definition bdlma_localbufferedobject.h:489
@ k_BUFFER_SIZE
Definition bdlma_localbufferedobject.h:276
allocator_type get_allocator() const
Definition bdlma_localbufferedobject.h:582
value_type * operator->()
Definition bdlma_localbufferedobject.h:516
void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args)
Definition bdlma_localbufferedobject.h:533
bsl::allocator allocator_type
Definition bdlma_localbufferedobject.h:274
LocalBufferedObject(bsl::allocator_arg_t, allocator_type allocator, BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args)
Definition bdlma_localsequentialallocator.h:230
Definition bslma_bslallocator.h:588
#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC)
Definition bdlma_localbufferedobject.h:245
#define BSLMF_ASSERT(expr)
Definition bslmf_assert.h:231
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2343
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2349
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_DELETED
Definition bsls_keyword.h:651
Definition bdlma_alignedallocator.h:278
Definition baljsn_encoder_testtypes.h:76
Definition bslmf_allocatorargt.h:433
Definition bslmf_enableif.h:530
static bsl::enable_if<!IsDerivedFromBslAllocator< t_ALLOC >::value, t_ALLOC >::type adapt(const t_ALLOC &from)
Definition bslma_allocatorutil.h:871
static void construct(TARGET_TYPE *address, const ALLOCATOR &allocator)
Definition bslma_constructionutil.h:1244
Definition bslma_usesbslmaallocator.h:344
Definition bsls_objectbuffer.h:277
TYPE * address()
Definition bsls_objectbuffer.h:335
TYPE & object()
Definition bsls_objectbuffer.h:352