BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslma::MemoryResourceImpSupport Struct Reference

#include <bslma_memoryresourceimpsupport.h>

Detailed Description

Namespace for functions that support implementing a memory resource.

See bslma_memoryresourceimpsupport

Static Public Member Functions

static BSLS_KEYWORD_CONSTEXPR void * singularPointer ()
 

Member Function Documentation

◆ singularPointer()

BSLS_KEYWORD_CONSTEXPR void * bslma::MemoryResourceImpSupport::singularPointer ( )
inlinestatic

Return a maximally aligned, non-null pointer that cannnot organically result from any operation other than calling this function; i.e., it is a singular pointer. Within a single program execution, no other current or future object, of any storage duration, will have an address matching this function's return value. The returned address may be used by an allocation function to indicate a non-allocation, e.g., the result of allocating zero bytes.

Precondition
The behavior is undefined if the returned pointer is dereferenced.
Note
Note that the same address is returned each time this function is called.

The documentation for this struct was generated from the following file: