diff --git a/include/etl/list.h b/include/etl/list.h index 2123bb23..ed78ca59 100644 --- a/include/etl/list.h +++ b/include/etl/list.h @@ -418,6 +418,7 @@ namespace etl typedef const T* const_pointer; typedef T& reference; typedef const T& const_reference; + typedef T&& rvalue_reference; #if ETL_CPP11_SUPPORTED typedef T&& rvalue_reference; #endif diff --git a/include/etl/memory.h b/include/etl/memory.h index b063dc1a..c1000b9e 100644 --- a/include/etl/memory.h +++ b/include/etl/memory.h @@ -510,6 +510,19 @@ namespace etl return *reinterpret_cast(p); } +#if ETL_CPP11_SUPPORTED + //***************************************************************************** + /// Construct an item at address p. + ///\ingroup memory + //***************************************************************************** + template + T& make_value_at(T* p, TParameter&& value) + { + ::new (p) T(std::move(value)); + return *reinterpret_cast(p); + } +#endif + //***************************************************************************** /// Construct an item at address p. ///\ingroup memory