For example, we have a function like that:
template <typename TYPE>
void construct_and_destruct(TYPE & object)
{
//...
}
We cant call constructor and destructor like object.Type()
and object.~Type()
(no true now) ( Whyy? =C )
To call the constructor we can like new(&object) TYPE()
. And I dont know how to call destructor (no exist placement delete
). How to do this?