Re: is auto_ptr part of STL?



ultranet wrote:
Look, nowadays almost nobody cares about VC6 anymore.
My company uses VC6, and no current plans to upgrade.

This is sad. You can nag your management until they decide
to upgrade. I don't know the situation in your company, it
can be that using VC6 is right and justified decision.
However, as time goes by, maintaining VC6 can become
eventually more expensive than upgrade to more compliant
compiler/library.

Having
that said, even less people care about esoteric throw
specifications of abandoned pre-standard compiler. It's
very rare situation when you write special handling for
`operator new' failure. Most of the time you just let
the exception to propagate up the stack. If `operator
new' fails, then it's a sign that you're already
severely messed up.
Thinking like this might be a reason of a lot of crashes,
IMHO.

No, you should handle crashes and exit gracefully. Just let
`operator new' return NULL, then on first access to this
pointer you'll get access violaton. handle this access
violation as any other exception (i.e., log it, save
everything you can and exit with nice message box to user).

Think about it. Allocation fails. What now? How many more
instructions can you safely to execute until another
exception? What's the state of CRT allocator? How did you
get to situation where `operator new' fails? These are very
difficult questions nad most likely you won't be able to
answer them at runtime at all. That's why Herb Sutter in his
article says that when `operator new' fails you cannot do
much anyway. What you _can_ do is to save as much as
possible of user data and exit immediately until even
greater damage is done.


.



Relevant Pages

  • RE: error C3646: exception : unknown override specifier
    ... Where on my system do I see the Upgrade Wizard log? ... which also give that error but then go on to list all the postings. ... In VC6, when we include the header, the std namespace is ... However, after VC6, say in VC2008, std namespace is not used by default: ...
    (microsoft.public.vc.language)
  • XP sp2 rc2 install failure
    ... I am also using a laptop. ... >unfortunately when attempting to upgrade a Toshiba ... >of "plylst9.wpl and requests path to install directory. ... >then attempts a rollback which also fails leaving the ...
    (microsoft.public.windowsxp.setup_deployment)
  • Re: Make Question
    ... I have inherited an old FreeBSD 5.1 machine. ... I needed to upgrade the perl/openssh/openssl implementation on ... So then I thought to csup the ports tree ... and try with a new version, that fails as well. ...
    (freebsd-questions)
  • Re: multiple IOS
    ... Assuming that your router meets the RAM memory requirements for your ... use a different flash card for the new image. ... You can then always use your current one as a fallback when the upgrade ... and if all else fails this url describes recovery procedures: ...
    (comp.dcom.sys.cisco)
  • Re: windows update 3.1 failure
    ... I have been unable to update windows via the windows ... It tries to install the newest updating software, but fails. ... I have tried to manually install it in safe mode, ... upgrade CD to upgrade to XPPro. ...
    (microsoft.public.windowsupdate)