8#ifndef INCLUDED_BDLB_NULLABLEALLOCATEDVALUE
9#define INCLUDED_BDLB_NULLABLEALLOCATEDVALUE
103#include <bdlscm_version.h>
133#include <bsl_algorithm.h>
134#include <bsl_cstddef.h>
135#include <bsl_cstdint.h>
136#include <bsl_iosfwd.h>
138#ifndef BDE_DONT_ALLOW_TRANSITIVE_INCLUDES
144#if BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
150# define COMPILING_BDLB_NULLABLEALLOCATEDVALUE_H
152# undef COMPILING_BDLB_NULLABLEALLOCATEDVALUE_H
182 enum { k_HAS_VALUE = 0 };
193# ifndef BSLS_COMPILERFEATURES_SUPPORT_OPERATOR_EXPLICIT
200 typedef BloombergLP::bsls::UnspecifiedBool<NullableAllocatedValue>
202 typedef typename UnspecifiedBoolUtil::BoolType UnspecifiedBool;
218 const TYPE *getAddress() const;
233 void setRemoteAddress(TYPE *newPtr);
262 bslma::UsesBslmaAllocator);
264 bslmf::IsBitwiseMoveable);
337#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
346 template <
class... ARGS>
349# if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
358 template <
class INIT_LIST_TYPE,
class... ARGS>
359 TYPE&
emplace(std::initializer_list<INIT_LIST_TYPE> il,
376 template <
class STREAM>
416 template <
class STREAM>
447#ifndef BDE_OMIT_INTERNAL_DEPRECATED
459 template <
class ANY_TYPE>
460 TYPE
value_or(
const ANY_TYPE& default_value)
const;
475# ifdef BSLS_COMPILERFEATURES_SUPPORT_OPERATOR_EXPLICIT
482 operator UnspecifiedBool() const BSLS_NOTHROW_SPEC
484 return UnspecifiedBoolUtil::makeValue(
has_value());
502 bsl::ostream&
print(bsl::ostream& stream,
504 int spacesPerLevel = 4)
const;
519 "Use 'has_value() ? &value() : address' instead")
520 const TYPE *addressOr(const TYPE *address) const;
522#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
538 template <
class... ARGS>
540 "Use 'emplace' instead")
541 TYPE& makeValueInplace(ARGS&&... args);
550 "Use 'value_or' instead")
551 TYPE valueOr(const TYPE& otherValue) const;
558 const TYPE *valueOrNull() const;
570template <class LHS_TYPE, class RHS_TYPE>
581template <class LHS_TYPE, class RHS_TYPE>
583 const RHS_TYPE& rhs);
584template <class LHS_TYPE, class RHS_TYPE>
585bool operator==(const LHS_TYPE& lhs,
595template <class LHS_TYPE, class RHS_TYPE>
606template <class LHS_TYPE, class RHS_TYPE>
608 const RHS_TYPE& rhs);
609template <class LHS_TYPE, class RHS_TYPE>
610bool operator!=(const LHS_TYPE& lhs,
620template <class LHS_TYPE, class RHS_TYPE>
627template <class LHS_TYPE, class RHS_TYPE>
629 const RHS_TYPE& rhs);
634template <class LHS_TYPE, class RHS_TYPE>
635bool operator<(const LHS_TYPE& lhs,
646template <class LHS_TYPE, class RHS_TYPE>
655template <class LHS_TYPE, class RHS_TYPE>
657 const RHS_TYPE& rhs);
664template <class LHS_TYPE, class RHS_TYPE>
665bool operator<=(const LHS_TYPE& lhs,
676template <class LHS_TYPE, class RHS_TYPE>
685template <class LHS_TYPE, class RHS_TYPE>
687 const RHS_TYPE& rhs);
694template <class LHS_TYPE, class RHS_TYPE>
695bool operator>(const LHS_TYPE& lhs,
705template <class LHS_TYPE, class RHS_TYPE>
714template <class LHS_TYPE, class RHS_TYPE>
716 const RHS_TYPE& rhs);
723template <class LHS_TYPE, class RHS_TYPE>
724bool operator>=(const LHS_TYPE& lhs,
737bsl::ostream& operator<<(
bsl::ostream& stream,
820template <class LHS_TYPE, class RHS_TYPE>
822 const
bsl::optional<RHS_TYPE>& rhs);
823template <class LHS_TYPE, class RHS_TYPE>
824bool operator==(const
bsl::optional<LHS_TYPE>& lhs,
830template <class LHS_TYPE, class RHS_TYPE>
832 const
bsl::optional<RHS_TYPE>& rhs);
833template <class LHS_TYPE, class RHS_TYPE>
834bool operator!=(const
bsl::optional<LHS_TYPE>& lhs,
841template <class LHS_TYPE, class RHS_TYPE>
843 const
bsl::optional<RHS_TYPE>& rhs);
849template <class LHS_TYPE, class RHS_TYPE>
850bool operator<(const
bsl::optional<LHS_TYPE>& lhs,
857template <class LHS_TYPE, class RHS_TYPE>
859 const
bsl::optional<RHS_TYPE>& rhs);
865template <class LHS_TYPE, class RHS_TYPE>
866bool operator>(const
bsl::optional<LHS_TYPE>& lhs,
873template <class LHS_TYPE, class RHS_TYPE>
875 const
bsl::optional<RHS_TYPE>& rhs);
881template <class LHS_TYPE, class RHS_TYPE>
882bool operator<=(const
bsl::optional<LHS_TYPE>& lhs,
889template <class LHS_TYPE, class RHS_TYPE>
891 const
bsl::optional<RHS_TYPE>& rhs);
897template <class LHS_TYPE, class RHS_TYPE>
898bool operator>=(const
bsl::optional<LHS_TYPE>& lhs,
907template <class HASHALG, class TYPE>
929: d_allocator(
bslma::Default::defaultAllocator())
931 d_storage.d_pointer_p = 0;
940 d_storage.d_pointer_p = 0;
946: d_allocator(
bslma::Default::defaultAllocator())
948 d_storage.d_pointer_p = 0;
956: d_allocator(allocator.mechanism())
958 d_storage.d_pointer_p = 0;
965: d_allocator(
bslma::Default::defaultAllocator())
971 d_storage.d_pointer_p = 0;
980: d_allocator(allocator.mechanism())
986 d_storage.d_pointer_p = 0;
993: d_allocator(
bslma::Default::defaultAllocator())
1003: d_allocator(allocator.mechanism())
1008template <
class TYPE>
1016template <
class TYPE>
1021 return (
sizeof(TYPE) <=
sizeof(TYPE *)) &&
1028template <
class TYPE>
1030NullableAllocatedValue<TYPE>&
1034 if (rhs.has_value()) {
1035 makeValue(rhs.value());
1044template <
class TYPE>
1053template <
class TYPE>
1062template <
class TYPE>
1063template <
class STREAM>
1068 char isNullFlag = 0;
1070 stream.getInt8(isNullFlag);
1075 bdexStreamIn(stream, value(), version);
1085template <
class TYPE>
1100 TYPE *tmpPtr =
reinterpret_cast<TYPE *
>(alloc->
allocate(
sizeof(TYPE)));
1105 setRemoteAddress(tmpPtr);
1112template <
class TYPE>
1133 TYPE *tmpPtr =
reinterpret_cast<TYPE *
>(alloc->
allocate(
sizeof(TYPE)));
1138 setRemoteAddress(tmpPtr);
1146template <
class TYPE>
1151 TYPE *p = getAddress();
1155 allocator()->deallocate(p);
1157 clearHasValueFlag();
1161template <
class TYPE>
1169 if (isNull() && other.
isNull()) {
1181template <
class TYPE>
1186 return *getAddress();
1189template <
class TYPE>
1194 return getAddress();
1197template <
class TYPE>
1205#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1206template <
class TYPE>
1207template <
class... ARGS>
1213 TYPE *ptr = getAddress();
1218 clearHasValueFlag();
1220 else if (!isLocal()) {
1224 ptr =
reinterpret_cast<TYPE *
>(alloc->
allocate(
sizeof(TYPE)));
1225 setRemoteAddress(ptr);
1229 BloombergLP::bslma::ConstructionUtil::construct(
1236 BloombergLP::bslma::ConstructionUtil::construct(
1246# if defined(BSLS_COMPILERFEATURES_SUPPORT_GENERALIZED_INITIALIZERS)
1247template <
class TYPE>
1248template <
class INIT_LIST_TYPE,
class... ARGS>
1250 std::initializer_list<INIT_LIST_TYPE> il,
1254 TYPE *ptr = getAddress();
1259 clearHasValueFlag();
1261 else if (!isLocal()) {
1265 ptr =
reinterpret_cast<TYPE *
>(alloc->
allocate(
sizeof(TYPE)));
1266 setRemoteAddress(ptr);
1270 BloombergLP::bslma::ConstructionUtil::construct(
1278 BloombergLP::bslma::ConstructionUtil::construct(
1292template <
class TYPE>
1294TYPE *NullableAllocatedValue<TYPE>::getAddress() {
1296 return reinterpret_cast<TYPE *
>(
1297 static_cast<void *
>(d_storage.d_buffer));
1300 return d_storage.d_pointer_p;
1304template <
class TYPE>
1306const TYPE *NullableAllocatedValue<TYPE>::getAddress()
const {
1308 return reinterpret_cast<const TYPE *
>(
1309 static_cast<const void *
>(d_storage.d_buffer));
1312 return d_storage.d_pointer_p;
1317template <
class TYPE>
1324template <
class TYPE>
1328 d_allocator.
setFlag(k_HAS_VALUE);
1331template <
class TYPE>
1333void NullableAllocatedValue<TYPE>::setRemoteAddress(TYPE *newPtr) {
1335 d_storage.d_pointer_p = newPtr;
1338template <
class TYPE>
1340void NullableAllocatedValue<TYPE>::swapLocal(NullableAllocatedValue& other)
1348 else if (other.isNull()) {
1349 other.makeValue(value());
1357template <
class TYPE>
1359void NullableAllocatedValue<TYPE>::swapRemote(NullableAllocatedValue& other)
1363 &other.d_storage.d_pointer_p);
1367template <
class TYPE>
1368template <
class STREAM>
1374 stream.putInt8(has_value() ? 0 : 1);
1377 bdexStreamOut(stream, value(), version);
1383template <
class TYPE>
1391template <
class TYPE>
1395 return d_allocator.
readFlag(k_HAS_VALUE);
1398template <
class TYPE>
1402 return !has_value();
1405# ifdef BSLS_COMPILERFEATURES_SUPPORT_OPERATOR_EXPLICIT
1406template <
class TYPE>
1413template <
class TYPE>
1416 int versionSelector)
const
1424 return maxSupportedBdexVersion(
reinterpret_cast<TYPE *
>(0),
1428#ifndef BDE_OMIT_INTERNAL_DEPRECATED
1429template <
class TYPE>
1433 return maxSupportedBdexVersion(0);
1437template <
class TYPE>
1438template <
class ANY_TYPE>
1442 return has_value() ? value() :
static_cast<TYPE
>(default_value);
1445template <
class TYPE>
1453template <
class TYPE>
1463template <
class TYPE>
1470template <
class TYPE>
1473 bsl::ostream& stream,
1475 int spacesPerLevel)
const
1487template <
class TYPE>
1491#ifndef BDE_OMIT_INTERNAL_DEPRECATED
1501 return *getAddress();
1506template <
class TYPE>
1510 return has_value() ? &value() : address;
1513#if !BSLS_COMPILERFEATURES_SIMULATE_CPP11_FEATURES
1514template <
class TYPE>
1515template <
class... ARGS>
1517TYPE& NullableAllocatedValue<TYPE>::makeValueInplace(ARGS&&... args)
1523template <
class TYPE>
1525TYPE NullableAllocatedValue<TYPE>::valueOr(
const TYPE& otherValue)
const
1527 return has_value() ? value() : otherValue;
1530template <
class TYPE>
1532const TYPE *NullableAllocatedValue<TYPE>::valueOrNull()
const {
1533 return has_value() ? &value() : NULL;
1539template <
class LHS_TYPE,
class RHS_TYPE>
1542 const NullableAllocatedValue<RHS_TYPE>& rhs)
1545 return rhs.isNull();
1548 return rhs.isNull() ? false :
lhs.value() ==
rhs.value();
1551template <
class LHS_TYPE,
class RHS_TYPE>
1554 const RHS_TYPE& rhs)
1556 return lhs.isNull() ? false :
lhs.value() ==
rhs;
1559template <
class LHS_TYPE,
class RHS_TYPE>
1562 const NullableAllocatedValue<RHS_TYPE>& rhs)
1564 return rhs.isNull() ? false :
lhs ==
rhs.value();
1567template <
class LHS_TYPE,
class RHS_TYPE>
1570 const NullableAllocatedValue<RHS_TYPE>& rhs)
1573 return !
rhs.isNull();
1576 return rhs.isNull() ? true :
lhs.value() !=
rhs.value();
1579template <
class LHS_TYPE,
class RHS_TYPE>
1582 const RHS_TYPE& rhs)
1584 return lhs.isNull() ? true :
lhs.value() !=
rhs;
1587template <
class LHS_TYPE,
class RHS_TYPE>
1590 const NullableAllocatedValue<RHS_TYPE>& rhs)
1592 return rhs.isNull() ? true :
lhs !=
rhs.value();
1595template <
class LHS_TYPE,
class RHS_TYPE>
1598 const NullableAllocatedValue<RHS_TYPE>& rhs)
1604 return lhs.isNull() ? true :
lhs.value() <
rhs.value();
1607template <
class LHS_TYPE,
class RHS_TYPE>
1610 const RHS_TYPE& rhs)
1612 return lhs.isNull() ? true :
lhs.value() <
rhs;
1615template <
class LHS_TYPE,
class RHS_TYPE>
1618 const NullableAllocatedValue<RHS_TYPE>& rhs)
1620 return rhs.isNull() ? false :
lhs <
rhs.value();
1623template <
class LHS_TYPE,
class RHS_TYPE>
1626 const NullableAllocatedValue<RHS_TYPE>& rhs)
1632 return rhs.isNull() ? false :
lhs.value() <=
rhs.value();
1635template <
class LHS_TYPE,
class RHS_TYPE>
1638 const RHS_TYPE& rhs)
1640 return lhs.isNull() ? true :
lhs.value() <=
rhs;
1643template <
class LHS_TYPE,
class RHS_TYPE>
1646 const NullableAllocatedValue<RHS_TYPE>& rhs)
1648 return rhs.isNull() ? false :
lhs <=
rhs.value();
1651template <
class LHS_TYPE,
class RHS_TYPE>
1654 const NullableAllocatedValue<RHS_TYPE>& rhs)
1660 return rhs.isNull() ? true :
lhs.value() >
rhs.value();
1663template <
class LHS_TYPE,
class RHS_TYPE>
1666 const RHS_TYPE& rhs)
1668 return lhs.isNull() ? false :
lhs.value() >
rhs;
1671template <
class LHS_TYPE,
class RHS_TYPE>
1674 const NullableAllocatedValue<RHS_TYPE>& rhs)
1676 return rhs.isNull() ? true :
lhs >
rhs.value();
1679template <
class LHS_TYPE,
class RHS_TYPE>
1682 const NullableAllocatedValue<RHS_TYPE>& rhs)
1688 return lhs.isNull() ? false :
lhs.value() >=
rhs.value();
1691template <
class LHS_TYPE,
class RHS_TYPE>
1694 const RHS_TYPE& rhs)
1696 return lhs.isNull() ? false :
lhs.value() >=
rhs;
1699template <
class LHS_TYPE,
class RHS_TYPE>
1702 const NullableAllocatedValue<RHS_TYPE>& rhs)
1704 return rhs.isNull() ? true :
lhs >=
rhs.value();
1707template <
class TYPE>
1710 const NullableAllocatedValue<TYPE>&
object)
1712 return object.print(stream, 0, -1);
1719template <
class TYPE>
1724 return !
lhs.has_value();
1727template <
class TYPE>
1733 return !
rhs.has_value();
1736template <
class TYPE>
1740 return lhs.has_value();
1743template <
class TYPE>
1749 return rhs.has_value();
1752template <
class TYPE>
1760template <
class TYPE>
1766 return rhs.has_value();
1769template <
class TYPE>
1774 return lhs.has_value();
1777template <
class TYPE>
1785template <
class TYPE>
1790 return !
lhs.has_value();
1793template <
class TYPE>
1802template <
class TYPE>
1810template <
class TYPE>
1816 return !
rhs.has_value();
1823template <
class LHS_TYPE,
class RHS_TYPE>
1828 if (
lhs.has_value() !=
rhs.has_value())
1830 return lhs.has_value () ?
lhs.value() ==
rhs.value () :
true;
1833template <
class LHS_TYPE,
class RHS_TYPE>
1836 const NullableAllocatedValue<RHS_TYPE>& rhs)
1838 if (
lhs.has_value() !=
rhs.has_value())
1840 return lhs.has_value () ?
lhs.value() ==
rhs.value () :
true;
1843template <
class LHS_TYPE,
class RHS_TYPE>
1848 if (
lhs.has_value() !=
rhs.has_value())
1850 return lhs.has_value () ?
lhs.value() !=
rhs.value () :
false;
1853template <
class LHS_TYPE,
class RHS_TYPE>
1856 const NullableAllocatedValue<RHS_TYPE>& rhs)
1858 if (
lhs.has_value() !=
rhs.has_value())
1860 return lhs.has_value () ?
lhs.value() !=
rhs.value () :
false;
1863template <
class LHS_TYPE,
class RHS_TYPE>
1868 if (
lhs.has_value() !=
rhs.has_value())
1869 return rhs.has_value();
1870 return lhs.has_value () ?
lhs.value() <
rhs.value () :
false;
1873template <
class LHS_TYPE,
class RHS_TYPE>
1876 const NullableAllocatedValue<RHS_TYPE>& rhs)
1878 if (
lhs.has_value() !=
rhs.has_value())
1879 return rhs.has_value();
1880 return lhs.has_value () ?
lhs.value() <
rhs.value () :
false;
1884template <
class LHS_TYPE,
class RHS_TYPE>
1889 if (
lhs.has_value() !=
rhs.has_value())
1890 return lhs.has_value();
1891 return lhs.has_value () ?
lhs.value() >
rhs.value () :
false;
1894template <
class LHS_TYPE,
class RHS_TYPE>
1897 const NullableAllocatedValue<RHS_TYPE>& rhs)
1899 if (
lhs.has_value() !=
rhs.has_value())
1900 return lhs.has_value();
1901 return lhs.has_value () ?
lhs.value() >
rhs.value () :
false;
1904template <
class LHS_TYPE,
class RHS_TYPE>
1909 if (
lhs.has_value() !=
rhs.has_value())
1910 return rhs.has_value();
1911 return lhs.has_value () ?
lhs.value() <=
rhs.value () :
true;
1914template <
class LHS_TYPE,
class RHS_TYPE>
1917 const NullableAllocatedValue<RHS_TYPE>& rhs)
1919 if (
lhs.has_value() !=
rhs.has_value())
1920 return rhs.has_value();
1921 return lhs.has_value () ?
lhs.value() <=
rhs.value () :
true;
1924template <
class LHS_TYPE,
class RHS_TYPE>
1929 if (
lhs.has_value() !=
rhs.has_value())
1930 return lhs.has_value();
1931 return lhs.has_value () ?
lhs.value() >=
rhs.value () :
true;
1934template <
class LHS_TYPE,
class RHS_TYPE>
1937 const NullableAllocatedValue<RHS_TYPE>& rhs)
1939 if (
lhs.has_value() !=
rhs.has_value())
1940 return lhs.has_value();
1941 return lhs.has_value () ?
lhs.value() >=
rhs.value () :
true;
1946template <
class HASHALG,
class TYPE>
1948 const NullableAllocatedValue<TYPE>& input)
1950 using ::BloombergLP::bslh::hashAppend;
1952 if (!input.isNull()) {
1961template <
class TYPE>
1962void bdlb::swap(NullableAllocatedValue<TYPE>& a,
1963 NullableAllocatedValue<TYPE>& b)
1965 if (a.allocator() == b.allocator()) {
1971 NullableAllocatedValue<TYPE> futureA(b, a.allocator());
1972 NullableAllocatedValue<TYPE> futureB(a, b.allocator());
#define BSLMF_NESTED_TRAIT_DECLARATION(t_TYPE, t_TRAIT)
Definition bslmf_nestedtraitdeclaration.h:231
Definition bdlb_nullableallocatedvalue_pointerbitspair.h:99
Definition bdlb_nullableallocatedvalue.h:180
const TYPE & value() const
Definition bdlb_nullableallocatedvalue.h:1489
char d_buffer[sizeof(TYPE *)]
Definition bdlb_nullableallocatedvalue.h:189
TYPE * d_pointer_p
Definition bdlb_nullableallocatedvalue.h:188
void reset()
Definition bdlb_nullableallocatedvalue.h:1148
TYPE ValueType
Definition bdlb_nullableallocatedvalue.h:258
TYPE value_or(const ANY_TYPE &default_value) const
Definition bdlb_nullableallocatedvalue.h:1440
bool has_value() const BSLS_KEYWORD_NOEXCEPT
Definition bdlb_nullableallocatedvalue.h:1393
TYPE & emplace(BSLS_COMPILERFEATURES_FORWARD_REF(ARGS)...)
NullableAllocatedValue()
Definition bdlb_nullableallocatedvalue.h:928
bsl::allocator< char > get_allocator() const
Definition bdlb_nullableallocatedvalue.h:1385
TYPE & makeValue()
Definition bdlb_nullableallocatedvalue.h:1114
NullableAllocatedValue< TYPE > & operator=(const NullableAllocatedValue &rhs)
Definition bdlb_nullableallocatedvalue.h:1031
~NullableAllocatedValue()
Destroy this object.
Definition bdlb_nullableallocatedvalue.h:1010
STREAM & bdexStreamIn(STREAM &stream, int version)
Definition bdlb_nullableallocatedvalue.h:1064
bsl::ostream & print(bsl::ostream &stream, int level=0, int spacesPerLevel=4) const
Definition bdlb_nullableallocatedvalue.h:1472
TYPE * operator->()
Definition bdlb_nullableallocatedvalue.h:1191
BSLS_DEPRECATE_FEATURE("bdl", "NullableAllocatedValue::makeValueInplace", "Use 'emplace' instead") TYPE &makeValueInplace(ARGS &&... args)
bool isNull() const BSLS_KEYWORD_NOEXCEPT
Definition bdlb_nullableallocatedvalue.h:1400
BSLS_DEPRECATE_FEATURE("bdl", "NullableAllocatedValue::addressOr", "Use 'has_value() ? &value() : address' instead") const TYPE *addressOr(const TYPE *address) const
void swap(NullableAllocatedValue &other)
Definition bdlb_nullableallocatedvalue.h:1162
STREAM & bdexStreamOut(STREAM &stream, int version) const
Definition bdlb_nullableallocatedvalue.h:1369
TYPE & value()
Definition bdlb_nullableallocatedvalue.h:1183
BSLS_DEPRECATE_FEATURE("bdl", "NullableAllocatedValue::valueOr", "Use 'value_or' instead") TYPE valueOr(const TYPE &otherValue) const
const TYPE * operator->() const
Definition bdlb_nullableallocatedvalue.h:1447
int maxSupportedBdexVersion() const
Definition bdlb_nullableallocatedvalue.h:1431
TYPE & operator*()
Definition bdlb_nullableallocatedvalue.h:1199
bslma::Allocator * allocator() const
Return the allocator used by this object to supply memory.
Definition bdlb_nullableallocatedvalue.h:1465
TYPE & makeValue(const TYPE &val)
Definition bdlb_nullableallocatedvalue.h:1087
const TYPE & operator*() const
Definition bdlb_nullableallocatedvalue.h:1455
Definition bslma_bslallocator.h:588
Definition bslstl_optional.h:2043
static void swap(T *a, T *b)
Definition bslalg_swaputil.h:182
Definition bslma_allocator.h:545
virtual void * allocate(size_type size)=0
Definition bslma_deallocatorproctor.h:312
void release()
Definition bslma_deallocatorproctor.h:389
void setFlag(unsigned idx)
Definition bdlb_nullableallocatedvalue_pointerbitspair.h:283
void clearFlag(unsigned idx)
Definition bdlb_nullableallocatedvalue_pointerbitspair.h:272
bool readFlag(unsigned idx) const
Definition bdlb_nullableallocatedvalue_pointerbitspair.h:262
t_TYPE * getPointer() const
Return the held pointer.
Definition bdlb_nullableallocatedvalue_pointerbitspair.h:254
#define BSLS_ASSERT(X)
Definition bsls_assert.h:1976
#define BSLS_COMPILERFEATURES_FORWARD_REF(T)
Definition bsls_compilerfeatures.h:2343
#define BSLS_COMPILERFEATURES_FORWARD(T, V)
Definition bsls_compilerfeatures.h:2349
#define BSLS_DEPRECATE_FEATURE(UOR, FEATURE, MESSAGE)
Definition bsls_deprecatefeature.h:387
#define BSLS_IDENT(str)
BSLS_IDENT() - insert string into .comment binary segment (if supported)
Definition bsls_ident.h:238
#define BSLS_KEYWORD_EXPLICIT
Definition bsls_keyword.h:683
#define BSLS_KEYWORD_NOEXCEPT
Definition bsls_keyword.h:674
bool isNull(const TYPE &object)
void makeValue(TYPE *object)
void reset(TYPE *object)
Reset the value of the specified object to its default value.
bsl::ostream & print(bsl::ostream &stream, const TYPE &object, int level=0, int spacesPerLevel=4)
Definition bdlb_printmethods.h:725
Definition bdlb_algorithmworkaroundutil.h:74
bool operator!=(const BigEndianInt16 &lhs, const BigEndianInt16 &rhs)
bsl::ostream & operator<<(bsl::ostream &stream, const BigEndianInt16 &integer)
bool operator>=(const Guid &lhs, const Guid &rhs)
void hashAppend(HASH_ALGORITHM &hashAlgorithm, const BigEndianInt16 &object)
void swap(NullableAllocatedValue< TYPE > &a, NullableAllocatedValue< TYPE > &b)
bool operator<=(const Guid &lhs, const Guid &rhs)
bool operator>(const Guid &lhs, const Guid &rhs)
bool operator<(const Guid &lhs, const Guid &rhs)
bool operator==(const BigEndianInt16 &lhs, const BigEndianInt16 &rhs)
Definition bdlat_valuetypefunctions.h:939
ALLOCATOR const STRING_VIEW_LIKE_TYPE & rhs
Definition bslstl_string.h:3918
ALLOCATOR & lhs
Definition bslstl_string.h:3917
Definition baljsn_encoder_testtypes.h:76
Definition bdlbb_blob.h:579
STREAM & bdexStreamIn(STREAM &stream, VALUE_TYPE &variable)
Definition bslx_instreamfunctions.h:1263
STREAM & bdexStreamOut(STREAM &stream, const TYPE &value)
Definition bslx_outstreamfunctions.h:1004
int maxSupportedBdexVersion(const TYPE *, int versionSelector)
Definition bslx_versionfunctions.h:531
Definition bdlb_printmethods.h:306
Definition bslstl_optional.h:522
static void defaultConstruct(TARGET_TYPE *address, bslma::Allocator *allocator)
Definition bslalg_scalarprimitives.h:1577
static void copyConstruct(TARGET_TYPE *address, const TARGET_TYPE &original, bslma::Allocator *allocator)
Definition bslalg_scalarprimitives.h:1617
Definition bslmf_isbitwisemoveable.h:718
Definition bsls_alignmentfromtype.h:378