I'm currently learning the STL and finding something I cant understand in the placement new;
placement new put a temporary varieable into a allocated memory.
But the life of temporary clearly says that the temporary varieable should be died after the line;
Why is that work?
// construct method to set value into some already allocated
template <class T, class T2>
inline void construct(T* pointer, T2& value)
{
new(pointer) T(value);
}