34#error THIS HEADER IS A GENERATOR. DO NOT INCLUDE.
63#ifndef ETL_VARIANT_POOL_INCLUDED
64#define ETL_VARIANT_POOL_INCLUDED
69#include "static_assert.h"
115 static const size_t MAX_SIZE = MAX_SIZE_;
124#if ETL_CPP11_NOT_SUPPORTED || ETL_USING_STLPORT
128 template <
typename T>
143 return base_t::template create<T>();
149 template <
typename T,
typename TP1>
164 return base_t::template create<T>(p1);
170 template <
typename T,
typename TP1,
typename TP2>
171 T*
create(
const TP1& p1,
const TP2& p2)
185 return base_t::template create<T>(p1, p2);
191 template <
typename T,
typename TP1,
typename TP2,
typename TP3>
192 T*
create(
const TP1& p1,
const TP2& p2,
const TP3& p3)
206 return base_t::template create<T>(p1, p2, p3);
212 template <
typename T,
typename TP1,
typename TP2,
typename TP3,
typename TP4>
213 T*
create(
const TP1& p1,
const TP2& p2,
const TP3& p3,
const TP4& p4)
227 return base_t::template create<T>(p1, p2, p3, p4);
233 template <
typename T,
typename... Args>
248 return base_t::template create<T>(etl::forward<Args>(args)...);
255 template <
typename T>
331 variant_pool_ext(
typename base_t::element* buffer,
size_t size)
332 : base_t(buffer, size)
336#if ETL_CPP11_NOT_SUPPORTED || ETL_USING_STLPORT
340 template <
typename T>
355 return base_t::template create<T>();
361 template <
typename T,
typename TP1>
376 return base_t::template create<T>(p1);
382 template <
typename T,
typename TP1,
typename TP2>
383 T*
create(
const TP1& p1,
const TP2& p2)
397 return base_t::template create<T>(p1, p2);
403 template <
typename T,
typename TP1,
typename TP2,
typename TP3>
404 T*
create(
const TP1& p1,
const TP2& p2,
const TP3& p3)
418 return base_t::template create<T>(p1, p2, p3);
424 template <
typename T,
typename TP1,
typename TP2,
typename TP3,
typename TP4>
425 T*
create(
const TP1& p1,
const TP2& p2,
const TP3& p3,
const TP4& p4)
439 return base_t::template create<T>(p1, p2, p3, p4);
445 template <
typename T,
typename... Args>
460 return base_t::template create<T>(etl::forward<Args>(args)...);
467 template <
typename T>
495 return base_t::max_size();
500 variant_pool_ext(
const variant_pool_ext&) ETL_DELETE;
501 variant_pool_ext& operator =(
const variant_pool_ext&) ETL_DELETE;
etl::enable_if< etl::is_trivially_destructible< typenameetl::iterator_traits< TIterator >::value_type >::value, void >::type destroy(TIterator, TIterator)
Definition: memory.h:1083
bitset_ext
Definition: absolute.h:38
size_t max_size() const
Returns the maximum number of items in the variant_pool.
Definition: variant_pool_generator.h:281
T * create(Args &&... args)
Creates the object from a type. Variadic parameter constructor.
Definition: variant_pool_generator.h:234
variant_pool()
Default constructor.
Definition: variant_pool_generator.h:120
void destroy(const T *const p)
Destroys the object.
Definition: variant_pool_generator.h:256