BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bdld_manageddatum.h
Go to the documentation of this file.
1/// @file bdld_manageddatum.h
2///
3/// The content of this file has been pre-processed for Doxygen.
4///
5
6
7// bdld_manageddatum.h -*-C++-*-
8#ifndef INCLUDED_BDLD_MANAGEDDATUM
9#define INCLUDED_BDLD_MANAGEDDATUM
10
11#include <bsls_ident.h>
12BSLS_IDENT("$Id$ $CSID$")
13
14/// @defgroup bdld_manageddatum bdld_manageddatum
15/// @brief Provide a smart-pointer-like manager for a `Datum` object.
16/// @addtogroup bdl
17/// @{
18/// @addtogroup bdld
19/// @{
20/// @addtogroup bdld_manageddatum
21/// @{
22///
23/// <h1> Outline </h1>
24/// * <a href="#bdld_manageddatum-purpose"> Purpose</a>
25/// * <a href="#bdld_manageddatum-classes"> Classes </a>
26/// * <a href="#bdld_manageddatum-description"> Description </a>
27/// * <a href="#bdld_manageddatum-value-semantics"> Value Semantics </a>
28/// * <a href="#bdld_manageddatum-resource-management"> Resource Management </a>
29/// * <a href="#bdld_manageddatum-usage"> Usage </a>
30/// * <a href="#bdld_manageddatum-example-1-basic-use-of-bdld-manageddatum"> Example 1: Basic Use of bdld::ManagedDatum </a>
31///
32/// # Purpose {#bdld_manageddatum-purpose}
33/// Provide a smart-pointer-like manager for a `Datum` object.
34///
35/// # Classes {#bdld_manageddatum-classes}
36///
37/// - bdld::ManagedDatum: a smart-pointer-like manager for a `Datum` object
38///
39/// @see bdld_datum
40///
41/// # Description {#bdld_manageddatum-description}
42/// This component implements a type, `bdld::ManagedDatum`, that
43/// provides two important services for `Datum` objects:
44///
45/// 1. `ManagedDatum` provides value-semantic-like operations for `Datum`.
46/// 2. `ManagedDatum` is a resource manager, similar to a smart pointer, for
47/// `Datum`.
48///
49/// These services allow clients to use a `ManagedDatum` object in most contexts
50/// where an object of a value-semantic type can be used (passed by value,
51/// stored in containers, and so on), even though `ManagedDatum` is not strictly
52/// value-semantic. These services are explored in subsequent sections.
53///
54/// The `Datum` type maintained by a `ManagedDatum` provides a space-efficient
55/// discriminated union (i.e., a variant) holding the value of a scalar type
56/// (e.g., `int`, `double`, `string`) or an aggregate of other `Datum` objects.
57/// See @ref bdld_datum for more details.
58///
59/// ## Value Semantics {#bdld_manageddatum-value-semantics}
60///
61///
62/// `ManagedDatum`, while not strictly a value-semantic type, provides the full
63/// set of value-semantic-like operations for `Datum` (see
64/// @ref bsldoc_glossary-value-semantic-operations ):
65///
66/// * Equality and Non-Equality Comparisons
67/// * Copy Construction
68/// * Copy Assignment
69/// * Default Construction
70/// * `ostream` Printing
71///
72/// In other words, the syntax of `ManagedDatum` is *regular*, but not all of
73/// its copy behavior is value-semantic. Specifically, for User Defined Types
74/// (i.e., those that `bdld::Datum::clone` does not deep-copy) `ManagedDatum`
75/// performs a shallow copy (copying the reference rather than the value), which
76/// is inconsistent with value-semantics. For *all* other types `ManagedDatum`
77/// copy operations (copy construction, copy assignment, and non-member `swap`
78/// when the allocators differ) will deep-copy the value using `Datum::clone`,
79/// which creates a completely independent copy, with independent lifetime, by
80/// duplicating all data, even referenced data (except for UDTs).
81///
82/// Additionally, move operations are supported (i.e. move constructor and move
83/// assignment). Depending on the match of the source and target allocators,
84/// `ManagedDatum` performs either shallow (the allocators are the same) or deep
85/// (the allocators are different) copying.
86///
87/// Note that a default constructed `ManagedDatum`, or a `ManagedDatum` on which
88/// `release` has been called, will have the null `Datum` value.
89///
90/// ## Resource Management {#bdld_manageddatum-resource-management}
91///
92///
93/// A `Datum` object's relationship to memory can be seen as analogous to a raw
94/// pointer, requiring calls to static functions `Datum::create*` and
95/// `Datum::destroy` to initialize and release resources (see the @ref bdld_datum
96/// component documentation). A `ManagedDatum`, by extension, provides a
97/// resource manager for a `Datum` that is analogous to a smart pointer.
98///
99/// The `adopt` method of a `ManagedDatum` is used to take ownership of a
100/// supplied `Datum` object, after which point the `ManagedDatum` object's
101/// destructor will free the resources of the managed `Datum` (unless `release`
102/// is subsequently called). Similar to a smart pointer, a `ManagedDatum`
103/// provides dereference operators to access the `Datum` object under
104/// management.
105///
106/// ## Usage {#bdld_manageddatum-usage}
107///
108///
109/// This section illustrates intended use of this component.
110///
111/// ### Example 1: Basic Use of bdld::ManagedDatum {#bdld_manageddatum-example-1-basic-use-of-bdld-manageddatum}
112///
113///
114/// This example demonstrates the basic construction and manipulation of a
115/// `ManagedDatum` object.
116///
117/// First, we create a `ManagedDatum` object that manages a `Datum` holding a
118/// `double` and verify that the managed object has the expected type and value:
119/// @code
120/// bslma::TestAllocator ta("test", veryVeryVerbose);
121///
122/// const ManagedDatum realObj(Datum::createDouble(-3.4375), &ta);
123///
124/// assert(realObj->isDouble());
125/// assert(-3.4375 == realObj->theDouble());
126/// @endcode
127/// Next, we create a `ManagedDatum` object that holds a string and again verify
128/// that it has the expected type and value:
129/// @code
130/// const char *str = "This is a string";
131/// const ManagedDatum strObj(Datum::copyString(str, &ta), &ta);
132///
133/// assert(strObj->isString());
134/// assert(str == strObj->theString());
135/// @endcode
136/// Then, we assign this `ManagedDatum` object to another object and verify both
137/// objects have the same value:
138/// @code
139/// ManagedDatum strObj1(&ta);
140/// strObj1 = strObj;
141/// assert(strObj == strObj1);
142/// @endcode
143/// Next, copy-construct this `ManagedDatum` object and verify that the copy has
144/// the same value as the original:
145/// @code
146/// const ManagedDatum strObj2(strObj, &ta);
147/// assert(strObj == strObj2);
148/// @endcode
149/// Then, we create a `ManagedDatum` object that holds an opaque pointer to a
150/// `bdlt::Date` object and verify that the managed `Date` has the expected
151/// value:
152/// @code
153/// bdlt::Date udt;
154/// ManagedDatum udtObj(Datum::createUdt(&udt, UDT_TYPE), &ta);
155///
156/// assert(udtObj->isUdt());
157/// assert(&udt == udtObj->theUdt().data());
158/// assert(UDT_TYPE == udtObj->theUdt().type());
159/// @endcode
160/// Next, we assign a boolean value to this `ManagedDatum` object and verify
161/// that it has the new type and value:
162/// @code
163/// udtObj.adopt(Datum::createBoolean(true));
164/// assert(udtObj->isBoolean());
165/// assert(true == udtObj->theBoolean());
166/// @endcode
167/// Then, we create a `ManagedDatum` object having an array and verify that it
168/// has the same array value. Note that in practice we would use
169/// @ref bdld_datumarraybuilder , but do not do so here for dependency reasons:
170/// @code
171/// const Datum datumArray[2] = {
172/// Datum::createInteger(12),
173/// Datum::copyString("A long string", &ta)
174/// };
175///
176/// DatumMutableArrayRef arr;
177/// Datum::createUninitializedArray(&arr, 2, &ta);
178/// for (int i = 0; i < 2; ++i) {
179/// arr.data()[i] = datumArray[i];
180/// }
181/// *(arr.length()) = 2;
182/// const ManagedDatum arrayObj(Datum::adoptArray(arr), &ta);
183///
184/// assert(arrayObj->isArray());
185/// assert(DatumArrayRef(datumArray, 2) == arrayObj->theArray());
186/// @endcode
187/// Next, we create a `ManagedDatum` object having a map and verify that it has
188/// the same map value. Note that in practice we would use
189/// @ref bdld_datummapbuilder , but do not do so here to for dependency reasons.
190/// @code
191/// const DatumMapEntry datumMap[2] = {
192/// DatumMapEntry(StringRef("first", static_cast<int>(strlen("first"))),
193/// Datum::createInteger(12)),
194/// DatumMapEntry(StringRef("second", static_cast<int>(strlen("second"))),
195/// Datum::copyString("A very long string", &ta))
196/// };
197///
198/// DatumMutableMapRef mp;
199/// Datum::createUninitializedMap(&mp, 2, &ta);
200/// for (int i = 0; i < 2; ++i) {
201/// mp.data()[i] = datumMap[i];
202/// }
203/// *(mp.size()) = 2;
204/// const ManagedDatum mapObj(Datum::adoptMap(mp), &ta);
205///
206/// assert(mapObj->isMap());
207/// assert(DatumMapRef(datumMap, 2, false, false) == mapObj->theMap());
208/// @endcode
209/// Then, we create a `Datum` object and assign its ownership to a
210/// `ManagedDatum` object and verify that the ownership was transferred:
211/// @code
212/// const Datum rcObj = Datum::copyString("This is a string", &ta);
213/// ManagedDatum obj(Datum::createInteger(1), &ta);
214/// obj.adopt(rcObj);
215/// assert(obj.datum() == rcObj);
216/// @endcode
217/// Next, we release the `Datum` object managed by `obj` and verify that it was
218/// released:
219/// @code
220/// const Datum internalObj = obj.release();
221/// assert(obj->isNull());
222/// assert(internalObj == rcObj);
223/// @endcode
224/// Finally, we destroy the released `Datum` object:
225/// @code
226/// Datum::destroy(internalObj, obj.get_allocator());
227/// @endcode
228/// @}
229/** @} */
230/** @} */
231
232/** @addtogroup bdl
233 * @{
234 */
235/** @addtogroup bdld
236 * @{
237 */
238/** @addtogroup bdld_manageddatum
239 * @{
240 */
241
242#include <bdlscm_version.h>
243
244#include <bdld_datum.h>
245
246#include <bslma_allocator.h>
247#include <bslma_allocatorutil.h>
248#include <bslma_bslallocator.h>
250
253
254#include <bsls_assert.h>
255#include <bsls_review.h>
256
257#include <bsl_algorithm.h>
258#include <bsl_iosfwd.h>
259
260
261namespace bdld {
262
263 // ==================
264 // class ManagedDatum
265 // ==================
266
267/// This class implements a smart-pointer-like resource manager for a
268/// `Datum` object.
269///
270/// See @ref bdld_manageddatum
272
273 public:
274 // TYPES
276
277 private:
278 // DATA
279 Datum d_data; // storage for data
280 allocator_type d_allocator; // allocator of dynamic memory
281
282 public:
283 // TRAITS
284
285 /// 'ManagedDatum' objects are allocator-aware and bitwise movable.
287
288 // CREATORS
289
290 /// Create a `ManagedDatum` object having the default (null) value, and the
291 /// specified `allocator` (e.g., the address of a `bslma::Allocator`
292 /// object) to supply memory. Calling `isNull` on the resulting managed
293 /// `Datum` object returns `true`.
294 ManagedDatum();
295 explicit ManagedDatum(const allocator_type& allocator);
296
297 /// Create a `ManagedDatum` object that assumes ownership of the specified
298 /// `datum`. Optionally specify an `allocator` (e.g., the address of a
299 /// `bslma::Allocator` object) to supply memory; otherwise, the default allocator is used.
300 ///
301 /// \pre The behavior is undefined unless `datum` was
302 /// allocated using the indicated allocator and is not subsequently
303 /// destroyed externally using `Datum::destroy`.
304 explicit ManagedDatum(const Datum& datum,
306
307 /// Create a `ManagedDatum` object having the same value as the specified
308 /// `original` object. Optionally specify an `allocator` (e.g., the
309 /// address of a `bslma::Allocator` object) used to supply memory;
310 /// otherwise, the default allocator is used. This operation performs a
311 /// `clone` of the underlying `Datum`, see {Value Semantics} for more
312 /// detail.
313 ManagedDatum(const ManagedDatum& original,
315
316 /// Create a `ManagedDatum` object having the same value and allocator as
317 /// the specified `original` object. The value of `original` becomes
318 /// unspecified but valid, and its allocator remains unchanged.
320
321 /// Create a `ManagedDatum` object having the same value as the specified
322 /// `original` object and the specified `allocator` (e.g., the address of a
323 /// `bslma::Allocator` object) used to supply memory. The allocator of
324 /// `original` remains unchanged. If `original` and the newly created
325 /// object have the same allocator then the value of `original` becomes
326 /// unspecified but valid, and no exceptions will be thrown; otherwise
327 /// `original` is unchanged and an exception may be thrown.
330
331 /// Destroy this object and release all dynamically allocated memory
332 /// managed by this object.
334
335 // MANIPULATORS
336
337 /// Assign to this object the value of the specified `rhs` object, and
338 /// return a non-`const` reference to this object. This operation performs
339 /// a `clone` of the underlying `Datum`, see {Value Semantics} for more
340 /// detail.
342
343 /// Assign to this object the value of the specified `rhs` object, and
344 /// return a non-`const` reference to this object. Depending on the match
345 /// of the object's allocators, this operation performs either shallow (the
346 /// allocators are the same) or deep (the allocators are different)
347 /// copying.
349
350 /// Take ownership of the specified `obj` and destroy the `Datum` object previously managed by this object.
351 ///
352 /// \pre The behavior is undefined unless
353 /// `obj` was allocated using the same allocator used by this object and is
354 /// not subsequently destroyed externally using `Datum::destroy`.
355 void adopt(const Datum& obj);
356
357 /// Assign to this object the specified `value` by making a "deep copy" of
358 /// `value`, so that any dynamically allocated memory managed by `value` is
359 /// cloned and not shared with `value`.
360 void clone(const Datum& value);
361
362 /// Make the `Datum` object managed by this object null and release all
363 /// dynamically allocated memory managed by this object.
364 void makeNull();
365
366 /// Return, *by* *value*, the `Datum` object managed by this object and set
367 /// the managed object to null. Ownership of the previously managed
368 /// `Datum` object is transferred to the caller.
369 Datum release();
370
371 /// Efficiently exchange the value of this object with the value of the
372 /// specified `other` object. This method provides the no-throw exception-safety guarantee.
373 ///
374 /// \pre The behavior is undefined unless this
375 /// object was created with the same allocator as `other`.
376 void swap(ManagedDatum& other);
377
378 // ACCESSORS
379
380 /// Return an address providing non-modifiable access to the `Datum` object
381 /// managed by this object.
382 const Datum *operator->() const;
383
384 /// Return a `const` reference to the `Datum` object managed by this
385 /// object.
386 const Datum& operator*() const;
387
388 /// Return a `const` reference to the `Datum` object managed by this
389 /// object.
390 const Datum& datum() const;
391
392 // Aspects
393
394 /// Return `get_allocator().mechanism()`.
395 ///
396 /// @deprecated Use @ref get_allocator() instead.
398
399 /// Return the allocator used by this object to supply memory.
400 ///
401 /// \note Note that if no allocator was supplied at construction the default allocator in
402 /// effect at construction is used.
404
405 /// Format this object to the specified output `stream` at the (absolute
406 /// value of) the optionally specified indentation `level` and return a
407 /// reference to the modifiable `stream`. If `level` is specified,
408 /// optionally specify `spacesPerLevel`, the number of spaces per
409 /// indentation level for this and all of its nested objects. If `level`
410 /// is negative, suppress indentation of the first line. If
411 /// `spacesPerLevel` is negative, format the entire output on one line,
412 /// suppressing all but the initial indentation (as governed by `level`).
413 /// If `stream` is not valid on entry, this operation has no effect.
414 bsl::ostream& print(bsl::ostream& stream,
415 int level = 0,
416 int spacesPerLevel = 4) const;
417};
418
419// FREE OPERATORS
420
421/// Return `true` if the specified `lhs` and `rhs` `ManagedDatum` objects have
422/// the same value, and `false` otherwise. Two `ManagedDatum` objects have the
423/// same value if their corresponding managed `Datum` objects have the same
424/// value. See the function-level documentation of the `Datum`
425/// equality-comparison operators for details.
426bool operator==(const ManagedDatum& lhs, const ManagedDatum& rhs);
427
428/// Return `true` if the specified `lhs` and `rhs` `ManagedDatum` objects do
429/// not have the same value, and `false` otherwise. Two `ManagedDatum` objects
430/// do not have the same value if their corresponding managed `Datum` objects
431/// do not have the same value. See the function-level documentation of the
432/// `Datum` equality-comparison operators for details.
433bool operator!=(const ManagedDatum& lhs, const ManagedDatum& rhs);
434
435/// Write the specified `rhs` value to the specified output `stream` and return
436/// a reference to the modifiable `stream`. This function has no effect if `stream` is not valid on entry.
437///
438/// \note Note that this method invokes `operator<<`
439/// defined for `Datum`. See the function-level documentation of the
440/// `operator<<` defined for `Datum` for details of the format of the output.
441bsl::ostream& operator<<(bsl::ostream& stream, const ManagedDatum& rhs);
442
443// FREE FUNCTIONS
444
445/// Exchange the values of the specified `a` and `b` objects. This function
446/// provides the no-throw exception-safety guarantee if the two objects were
447/// created with the same allocator and the basic guarantee otherwise.
448///
449/// \note Note that in case the allocators are different this function places a *clone* of
450/// `a` into `b`, and vice versa. See {Value Semantics} on details of the
451/// cloning that may happen.
452void swap(ManagedDatum& a, ManagedDatum& b);
453
454// ============================================================================
455// INLINE DEFINITIONS
456// ============================================================================
457
458 // ------------------
459 // class ManagedDatum
460 // ------------------
461
462// CREATORS
463inline
465: d_data(Datum::createNull())
466, d_allocator()
467{
468}
469
470inline
472: d_data(Datum::createNull())
473, d_allocator(allocator)
474{
475}
476
477inline
478ManagedDatum::ManagedDatum(const Datum& datum, const allocator_type& allocator)
479: d_data(datum)
480, d_allocator(allocator)
481{
482}
483
484inline
486 const allocator_type& allocator)
487: d_allocator(allocator)
488{
489 d_data = original.d_data.clone(d_allocator);
490}
491
492inline
494: d_data(bslmf::MovableRefUtil::access(original).d_data)
495, d_allocator(bslmf::MovableRefUtil::access(original).d_allocator)
496{
498}
499
500inline
502 const allocator_type& allocator)
503: d_allocator(allocator)
504{
505 ManagedDatum& originalAsLvalue = bslmf::MovableRefUtil::access(original);
506
507 if (allocator == originalAsLvalue.allocator()) {
508 d_data = originalAsLvalue.d_data;
509 originalAsLvalue.d_data = Datum::createNull();
510 }
511 else {
512 d_data = originalAsLvalue.d_data.clone(d_allocator);
513 }
514}
515
516inline
518{
519 Datum::destroy(d_data, d_allocator);
520}
521
522// MANIPULATORS
523inline
525{
526 ManagedDatum copy(rhs, d_allocator);
527 swap(copy);
528 return *this;
529}
530
531inline
533{
535
536 if (&rhsAsLvalue == this) {
537 // self-assignment
538 return *this; // RETURN
539 }
540
541 if (d_allocator == rhsAsLvalue.allocator()) {
542 Datum::destroy(d_data, d_allocator);
543 d_data = rhsAsLvalue.d_data;
544 rhsAsLvalue.d_data = Datum::createNull();
545 }
546 else {
547 ManagedDatum copy(rhsAsLvalue, d_allocator);
548 swap(copy);
549 }
550 return *this;
551}
552
553inline
555{
556 if (&obj != &d_data) {
557 ManagedDatum(obj, d_allocator).swap(*this);
558 }
559}
560
561inline
562void ManagedDatum::clone(const Datum& value)
563{
564 Datum data = value.clone(d_allocator);
565 ManagedDatum(data, d_allocator).swap(*this);
566}
567
568inline
570{
571 ManagedDatum(d_allocator).swap(*this);
572}
573
574inline
576{
577 Datum temp = d_data;
578 d_data = Datum::createNull();
579 return temp;
580}
581
582inline
584{
585 BSLS_ASSERT(d_allocator == other.get_allocator());
586
587 using bsl::swap;
588 swap(d_data, other.d_data);
589}
590
591// ACCESSORS
592inline
594{
595 return &d_data;
596}
597
598inline
600{
601 return d_data;
602}
603
604inline
606{
607 return d_data;
608}
609
610 // Aspects
611
612inline
617
618inline
620{
621 return d_allocator;
622}
623
624inline
625bsl::ostream& ManagedDatum::print(bsl::ostream& stream,
626 int level,
627 int spacesPerLevel) const
628{
629 return d_data.print(stream, level, spacesPerLevel);
630}
631
632} // close package namespace
633
634// FREE OPERATORS
635inline
636bool bdld::operator==(const ManagedDatum& lhs, const ManagedDatum& rhs)
637{
638 return (lhs.datum() == rhs.datum());
639}
640
641inline
642bool bdld::operator!=(const ManagedDatum& lhs, const ManagedDatum& rhs)
643{
644 return (lhs.datum() != rhs.datum());
645}
646
647inline
648bsl::ostream& bdld::operator<<(bsl::ostream& stream, const ManagedDatum& rhs)
649{
650 return (stream << rhs.datum());
651}
652
653// FREE FUNCTIONS
654inline
655void bdld::swap(ManagedDatum& a, ManagedDatum& b)
656{
657 if (a.get_allocator() == b.get_allocator()) {
658 a.swap(b);
659 }
660 else {
661 ManagedDatum tempA(a, b.get_allocator());
662 ManagedDatum tempB(b, a.get_allocator());
663
664 a.swap(tempB);
665 b.swap(tempA);
666 }
667}
668
669
670
671#endif
672
673// ----------------------------------------------------------------------------
674// Copyright 2020 Bloomberg Finance L.P.
675//
676// Licensed under the Apache License, Version 2.0 (the "License");
677// you may not use this file except in compliance with the License.
678// You may obtain a copy of the License at
679//
680// http://www.apache.org/licenses/LICENSE-2.0
681//
682// Unless required by applicable law or agreed to in writing, software
683// distributed under the License is distributed on an "AS IS" BASIS,
684// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
685// See the License for the specific language governing permissions and
686// limitations under the License.
687// ----------------------------- END-OF-FILE ----------------------------------
688
689/** @} */
690/** @} */
691/** @} */
Definition bdld_datum.h:799
static Datum createNull()
Return, by value, a datum having no value.
Definition bdld_datum.h:4049
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
static void destroy(const Datum &value, const AllocatorType &allocator)
Datum clone(const AllocatorType &allocator) const
Definition bdld_manageddatum.h:271
~ManagedDatum()
Definition bdld_manageddatum.h:517
void swap(ManagedDatum &other)
Definition bdld_manageddatum.h:583
ManagedDatum()
Definition bdld_manageddatum.h:464
void adopt(const Datum &obj)
Definition bdld_manageddatum.h:554
bslma::Allocator * allocator() const
Definition bdld_manageddatum.h:613
BSLMF_NESTED_TRAIT_DECLARATION(ManagedDatum, bslmf::IsBitwiseMoveable)
'ManagedDatum' objects are allocator-aware and bitwise movable.
const Datum * operator->() const
Definition bdld_manageddatum.h:593
const Datum & datum() const
Definition bdld_manageddatum.h:605
void makeNull()
Definition bdld_manageddatum.h:569
bsl::allocator allocator_type
Definition bdld_manageddatum.h:275
Datum release()
Definition bdld_manageddatum.h:575
void clone(const Datum &value)
Definition bdld_manageddatum.h:562
allocator_type get_allocator() const
Definition bdld_manageddatum.h:619
const Datum & operator*() const
Definition bdld_manageddatum.h:599
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bdld_manageddatum.h:625
ManagedDatum & operator=(const ManagedDatum &rhs)
Definition bdld_manageddatum.h:524
Definition bslma_bslallocator.h:588
BloombergLP::bslma::Allocator * mechanism() const
Definition bslma_bslallocator.h:1146
Definition bslma_allocator.h:545
Definition bslmf_movableref.h:752
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
Definition bdld_datum.h:740
bsl::ostream & operator<<(bsl::ostream &stream, const Datum &rhs)
bool operator==(const Datum &lhs, const Datum &rhs)
void swap(ManagedDatum &a, ManagedDatum &b)
bool operator!=(const Datum &lhs, const Datum &rhs)
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
Definition bdlbb_blob.h:579
Definition bslmf_isbitwisemoveable.h:718
static t_TYPE & access(t_TYPE &ref) BSLS_KEYWORD_NOEXCEPT
Definition bslmf_movableref.h:1039