15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Bug in auto_ptr<>::release

Benny -- blee@filenet.com
Thursday, October 24, 1996


Environment: VC++ 4.2, NT 4.0

I believe that there is either a bug in auto_ptr<>::release or an error in 
the documentation.

According to the doc, calling 'release' should initialized the stored 
pointer to 0.  However, the implementation of auto_ptr<>::release does not 
initialize the stored pointer to 0.

Currently, my workaround is:
     auto_ptr x;
     ...
     x.release();
     x = auto_ptr(0);

     ...
     if (x.get())
          ...

I hope Microsoft is watching this list and make the necessary modification.

[Moderator's note: This list is not associated with Microsoft.  Bug
reports are welcome here, but if you don't tell MS directly, don't
expect to get any results other than by the good graces of those
list members who work at MS.]

Benny



Mike Blaszczak -- mikeblas@nwlink.com
Sunday, October 27, 1996

At 13:50 10/24/96 PDT, Lee, Benny wrote:

>Environment: VC++ 4.2, NT 4.0

>I believe that there is either a bug in auto_ptr<>::release or an error in 
>the documentation.

>I hope Microsoft is watching this list and make the necessary modification.

I always hope that our customers will read the documentation, but it seems
that few do.  You'll find the "Technical Support" command in the "Help" menu
a very valuable reference--it'll teach you how to contact Microsoft support
services so that you can report bugs.

It also explains how you can write to msvc@microsoft.com with comments about
the product. If you send mail there, the automatic response includes
instructions for getting to a web page that allows you to submit bug
reports.

In the meantime, it turns out that auto_ptr is a feature of the unstandard
C++ Runtime library, not MFC.

.B ekiM
http://www.nwlink.com/~mikeblas/
I'm afraid I've become some sort of speed freak.
These words are my own. I do not speak on behalf of Microsoft.





| Вернуться в корень Архива |