template union Poco::Placeholder
Overview
ValueHolder union (used by Poco::Any and Poco::Dynamic::Var for small object optimization, when enabled). Moreā¦
#include <Any.h> template < typename PlaceholderT, unsigned int SizeV = POCO_SMALL_OBJECT_SIZE > union Placeholder { // structs struct Size; // methods void erase(); bool isLocal() const; void setLocal(bool local) const; PlaceholderT* content() const; };
Detailed Documentation
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 (0 => heap, 1 => local).