# Poco

# template < typename PlaceholderT, unsigned int SizeV = 64 >

# union Placeholder

Library: Foundation
Package: Core
Header: Poco/Any.h

## Description

ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for small object optimization, when enabled).

If Holder<Type> fits into POCO_SMALL_OBJECT_SIZE bytes of storage, it will be placement-new-allocated into the local buffer (i.e. there will be no heap-allocation). The local buffer size is one byte larger - [POCO_SMALL_OBJECT_SIZE + 1], additional byte value indicating where the object was allocated. See enum Allocation.

Important: for SOO builds, only same-type (or trivial both-empty no-op) swap operation is allowed.

## Member Summary

Member Functions: assign, content, erase, isEmpty, isLocal, operator =, swap

## Nested Classes

### struct Size

## Constructors

### Placeholder

Placeholder();

### Placeholder

Placeholder(
const Placeholder & param156
) = delete;

### Placeholder

Placeholder(
Placeholder && param157
) = delete;

## Destructor

### ~Placeholder

~Placeholder();

## Member Functions

### assign

template < typename T, typename V, typename std::enable_if_t < TypeSizeLE < T, Placeholder::Size::value >::value > * = nullptr > PlaceholderT * assign(
const V & value
);

### assign

template < typename T, typename V, typename std::enable_if_t < TypeSizeGT < T, Placeholder::Size::value >::value > * = nullptr > PlaceholderT * assign(
const V & value
);

### content

PlaceholderT * content() const;

### erase

void erase();

### isEmpty

bool isEmpty() const;

### isLocal

bool isLocal() const;

### operator =

Placeholder & operator = (
const Placeholder & param158
) = delete;

### operator =

Placeholder & operator = (
Placeholder && param159
) = delete;

### swap

void swap(
Placeholder & other
) noexcept;