heap_allocator<> extended

This commit is contained in:
Simon Rozman 2016-05-30 12:10:21 +02:00
parent 0ed2d0a53d
commit b091bc90bc

View File

@ -155,6 +155,17 @@ namespace stdex
HeapFree(m_heap, 0, ptr); HeapFree(m_heap, 0, ptr);
} }
///
/// Calls copying constructor for the element
///
/// \param[in] ptr Pointer to memory block
/// \param[in] val Source element
///
inline void construct(_Inout_ pointer ptr, _In_ const _Ty& val)
{
::new ((void*)ptr) _Ty(val);
}
/// ///
/// Calls moving constructor for the element /// Calls moving constructor for the element
/// ///