
27 Oct
2011
27 Oct
'11
8 p.m.
On 27.10.2011 01:14, Olaf van der Spek wrote:
Maybe off-topic, but why should one prefer scoped_array to vector? Just curious, I never used it myself.
And it can be used when construction of elements (like int) is unwanted.
Then "new T[sz]" will be better than "new T[sz]()".
2. What should happen when size = 0? Should it call new T[0] or should it just use NULL?
Will two overloads scoped_ptr(T*) and scoped_ptr(size_t) conflict with each other, when somebody calls scoped_ptr<T>(0)?