That is correct, there is no shared_array in TR1.
You can, however, provide your own deleter object to perform "delete []" if you wish using this constructor:
template<class Other, class D>
shared_ptr(Other* ptr, D dtor);
For example:
template<typename T>
struct my_array_deleter
{
void operator()(T* p)
{
delete [] p;
}
};
shared_ptr<int> sp(new int[100], my_array_deleter<int>());
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…