BDE 4.14.0 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>
207#include <bslma_stdallocator.h>
209
210#include <bslmf_assert.h>
212
214#include <bsls_keyword.h>
215#include <bsls_objectbuffer.h>
216
217#include <bsl_type_traits.h>
218
219#ifdef BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
220# include <initializer_list>
221#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
222
223#include <bsl_cstddef.h> // size_t
224#include <bsl_utility.h>
225
226#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
227// Include version that can be compiled with C++03
228// Generated on Fri Apr 5 12:00:49 2024
229// Command line: sim_cpp11_features.pl bdlma_localbufferedobject.h
230# define COMPILING_BDLMA_LOCALBUFFEREDOBJECT_H
232# undef COMPILING_BDLMA_LOCALBUFFEREDOBJECT_H
233#else
234
235#ifdef BSLS_LIBRARYFEATURES_HAS_CPP11_BASELINE_LIBRARY
236#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC) \
237 std::is_assignable<DST, SRC>::value
238#else
239#define BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE(DST, SRC) true
240#endif
241
242
243namespace bdlma {
244
245 // =========================
246 // class LocalBufferedObject
247 // =========================
248
249/// This `class` contains an object of type `t_TYPE` and a local sequential
250/// allocator with an arena size of `t_BUFFER_SIZE`, from which the `t_TYPE`
251/// object allocates memory, in a single object. The
252/// `t_DISABLE_DESTRUCTION` template parameter can be used to prevent this
253/// `class` from calling `~t_TYPE()` in cases where it is known that
254/// `t_TYPE` manages no resources other than memory, since the memory will
255/// be adequately managed by the local sequential allocator.
256///
257/// See @ref bdlma_localbufferedobject
258template <class t_TYPE,
259 bsl::size_t t_BUFFER_SIZE = 1024,
260 bool t_DISABLE_DESTRUCTION = false>
262
264
265 public:
266 // PUBLIC TYPES
267 typedef t_TYPE value_type;
269
270 enum { k_BUFFER_SIZE = t_BUFFER_SIZE }; // The 'size' template
271 // parameter to 'LocalAllocator'
272 // takes an 'int', not 'size_t'.
273
274 private:
275 // DATA
278
279 private:
280 // NOT IMPLEMENTED
284
285 // PRIVATE MANIPULATORS
286
287 /// Call `d_arenaAllocator.release()`. If `t_DISABLE_DESTRUCTION` is
288 /// `false`, destroy the held object first.
289 void destroyHeldObject();
290
291 public:
292 // TRAITS
294 BloombergLP::bslmf::UsesAllocatorArgT);
295
296 // CREATORS
297#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
298 /// Create a `value_type` object using the specified `args` that will
299 /// allocate memory from a sequential allocator based on a local stack
300 /// buffer of (template parameter) `t_BUFFER_SIZE` size; if local stack
301 /// memory is exhausted, use the default allocator to supply additional
302 /// heap memory.
303 template <class... ARGS>
304 explicit LocalBufferedObject(
306
307 /// Create a `value_type` object using the specified `args` that will
308 /// allocate memory from a sequential allocator based on a local stack
309 /// buffer of (template parameter) `t_BUFFER_SIZE` size; if local stack
310 /// memory is exhausted, use the specified `allocator` to supply
311 /// additional heap memory.
312 template <class... ARGS>
313 LocalBufferedObject(bsl::allocator_arg_t ,
314 allocator_type allocator,
316#endif
317
318#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
319 /// Create the `value_type` object using the specified
320 /// @ref initializer_list and using the sequential allocator based on a
321 /// local stack buffer of (template parameter) `t_BUFFER_SIZE` size; if
322 /// local stack memory is exausted, use the default allocator to supply
323 /// additional heap memory.
324 template <class INIT_LIST_TYPE>
325 LocalBufferedObject(std::initializer_list<INIT_LIST_TYPE> il);
326
327 /// Create the `value_type` object using the specified
328 /// @ref initializer_list and using the sequential allocator based on a
329 /// local stack buffer of (template parameter) `t_BUFFER_SIZE` size; if
330 /// local stack memory is exausted, use the specified `allocator` to
331 /// supply additional heap memory.
332 template <class INIT_LIST_TYPE>
333 LocalBufferedObject(bsl::allocator_arg_t ,
334 allocator_type allocator,
335 std::initializer_list<INIT_LIST_TYPE> il);
336
337#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
338
339 /// Destroy this object and free any memory it uses, and if the
340 /// (template parameter) `t_DISABLE_DESTRUCTION` is `true`, do this
341 /// *without* calling the destructor of `value_type` (see
342 /// `t_DISABLE_DESTRUCTION` template parameter in the component doc).
344
345 // MANIPULATORS
346#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
347 /// Assign the object held by this container to the specified `value`.
348 template <class t_ANY_TYPE>
350 t_TYPE,
352 LocalBufferedObject>::type&
353 operator=(BSLS_COMPILERFEATURES_FORWARD_REF(t_ANY_TYPE) value);
354#endif
355
356 /// Return a pointer providing modifiable access to the underlying
357 /// `t_TYPE` object.
359
360 /// Return a reference providing modifiable access to the underlying
361 /// `t_TYPE` object.
363
364#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
365 /// Destroy the `value_type` object unless `t_DISABLE_DESTRUCTION` is
366 /// true, then release all allocated memory, the re-construct a new
367 /// `value_type` object using the specified `args` and using the
368 /// sequential allocator based on the local stack buffer.
369 template <class... ARGS>
370 void emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args);
371#endif
372
373#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
374 /// Destroy the `value_type` object unless `t_DISABLE_DESTRUCTION` is
375 /// true, then release all allocated memory, the re-construct a new
376 /// `value_type` object using the specified `il` and using the
377 /// sequential allocator based on the local stack buffer.
378 template <class INIT_LIST_TYPE>
379 void emplace(std::initializer_list<INIT_LIST_TYPE> il);
380
381#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
382
383 // ACCESSORS
384
385 /// Return a pointer providing const access to the underlying `t_TYPE`
386 /// object.
387 const value_type *operator->() const;
388
389 /// Return a reference providing const access to the underlying `t_TYPE`
390 /// object.
391 const value_type& operator*() const;
392
393 /// Return the alloctor passed at construction, used to provide heap
394 /// memory after the local stack buffer is exhausted. Note that this
395 /// is not the arena allocator contained in this object.
397};
398
399// ============================================================================
400// INLINE & TEMPLATE DEFINITIONS
401// ============================================================================
402
403 // -------------------
404 // LocalBufferedObject
405 // -------------------
406
407// PRIVATE MANIPULATORS
408template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
409inline
412{
413 if (!t_DISABLE_DESTRUCTION) {
414 d_object.address()->~value_type();
415 }
416}
417
418// CREATORS
419#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
420template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
421template <class... ARGS>
422inline
432
433template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
434template <class... ARGS>
435inline
437 LocalBufferedObject(bsl::allocator_arg_t ,
438 bsl::allocator<> allocator,
440: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
441{
443 d_object.address(),
444 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
445 BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
446}
447#endif
448
449#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
450template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
451template <class INIT_LIST_TYPE>
452inline
454 LocalBufferedObject(std::initializer_list<INIT_LIST_TYPE> il)
455: d_arenaAllocator()
456{
458 d_object.address(),
459 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
460 il);
461}
462
463template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
464template <class INIT_LIST_TYPE>
465inline
466LocalBufferedObject<t_TYPE, t_BUFFER_SIZE, t_DISABLE_DESTRUCTION>::
467 LocalBufferedObject(bsl::allocator_arg_t ,
468 bsl::allocator<> allocator,
469 std::initializer_list<INIT_LIST_TYPE> il)
470: d_arenaAllocator(bslma::AllocatorUtil::adapt(allocator))
471{
473 d_object.address(),
474 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
475 il);
476}
477#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
478
479template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
480inline
486
487// MANIPULATORS
488#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
489/// Assign the object held by this container to the specified `value`.
490template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
491template <class t_ANY_TYPE>
492typename bsl::enable_if<
494 t_TYPE,
504#endif
505
506template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
507inline
513
514template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
515inline
521
522#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
523template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
524template <class... ARGS>
527{
528 destroyHeldObject();
529 d_arenaAllocator.release();
531 d_object.address(),
532 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
533 BSLS_COMPILERFEATURES_FORWARD(ARGS, args)...);
534}
535#endif
536
537#if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
538template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
539template <class INIT_LIST_TYPE>
541 emplace(std::initializer_list<INIT_LIST_TYPE> il)
542{
543 destroyHeldObject();
544 d_arenaAllocator.release();
546 d_object.address(),
547 bslma::AllocatorUtil::adapt(&d_arenaAllocator),
548 il);
549}
550#endif // BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS
551
552// ACCESSORS
553template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
554inline
555const t_TYPE *
561
562template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
563inline
564const t_TYPE&
570
571template <class t_TYPE, bsl::size_t t_BUFFER_SIZE, bool t_DISABLE_DESTRUCTION>
572inline
579
580#undef BDLMA_LOCAL_BUFFERED_VALUE_IS_ASSIGNABLE
581
582} // close package namespace
583
584
585#endif // End C++11 code
586
587#endif // ifndef INCLUDED_BDLMA_LOCALBUFFEREDOBJECT
588
589// ----------------------------------------------------------------------------
590// Copyright 2024 Bloomberg Finance L.P.
591//
592// Licensed under the Apache License, Version 2.0 (the "License");
593// you may not use this file except in compliance with the License.
594// You may obtain a copy of the License at
595//
596// http://www.apache.org/licenses/LICENSE-2.0
597//
598// Unless required by applicable law or agreed to in writing, software
599// distributed under the License is distributed on an "AS IS" BASIS,
600// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
601// See the License for the specific language governing permissions and
602// limitations under the License.
603// ----------------------------- END-OF-FILE ----------------------------------
604
605/** @} */
606/** @} */
607/** @} */
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
Definition bdlma_localbufferedobject.h:261
BSLMF_NESTED_TRAIT_DECLARATION(LocalBufferedObject, BloombergLP::bslmf::UsesAllocatorArgT)
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
LocalBufferedObject(bsl::allocator_arg_t, allocator_type allocator, BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)... args)
@ 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_IDENT(str)
Definition bsls_ident.h:195
#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