Replacing auto_ptr in VC++ 8

后端 未结 7 1492
Happy的楠姐
Happy的楠姐 2021-02-14 17:31

std::auto_ptr is broken in VC++ 8 (which is what we use at work). My main gripe with it is that it allows auto_ptr x = new T();, which of cour

相关标签:
7条回答
  • 2021-02-14 17:56

    Why do you think std::auto_ptr<> is broken.

    I would have though that somthing as bad as that would have been reported to the standards comitte!

    Do you mean that you need to:

    std::auto_ptr<T>   x(new T);  // Use the explicit constructor.
    
    0 讨论(0)
提交回复
热议问题