Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Turn off exception

Reply
Thread Tools

Turn off exception

 
 
Immortal Nephi
Guest
Posts: n/a
 
      07-27-2010
Can I turn off exception on C++ Compilerís setting if I use vector
and string in release mode?
I prefer to use assert in debug mode. If index is out of range
bondary in operator[] function, then assert is triggered. Turn off
checking range boundary helps to increase performance in release mode.
 
Reply With Quote
 
 
 
 
Jonathan Lee
Guest
Posts: n/a
 
      07-27-2010
On Jul 27, 12:41*pm, Immortal Nephi <(E-Mail Removed)>
wrote:
> * * * * Can I turn off exception on C++ Compilerís setting if I use vector
> and string in release mode?
> * * * * I prefer to use assert in debug mode. *If index is out of range
> bondary in operator[] function, then assert is triggered. *Turn off
> checking range boundary helps to increase performance in release mode.


vector:perator[] doesn't do bounds checking. vector::at() is the
equivalent function for bounds checking.

As for your question, check in a newsgroup for your compiler. I think
turning off exceptions in general was/is a supported feature of most
compilers.

--Jonathan
 
Reply With Quote
 
 
 
 
James Kanze
Guest
Posts: n/a
 
      07-30-2010
On Jul 27, 5:57 pm, Jonathan Lee <(E-Mail Removed)> wrote:
> On Jul 27, 12:41 pm, Immortal Nephi <(E-Mail Removed)>
> wrote:


> > Can I turn off exception on C++ Compilerís setting if I use vector
> > and string in release mode?
> > I prefer to use assert in debug mode. If index is out of range
> > bondary in operator[] function, then assert is triggered. Turn off
> > checking range boundary helps to increase performance in release mode.


> vector:perator[] doesn't do bounds checking. vector::at() is the
> equivalent function for bounds checking.


> As for your question, check in a newsgroup for your compiler. I think
> turning off exceptions in general was/is a supported feature of most
> compilers.


Except that generally speaking, if you turn off exceptions, you
can't use the standard library.

--
James Kanze
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Any way to turn off exception handling? (debugging) Paul Rubin Python 6 02-12-2010 01:53 PM
Any way to turn off exception handling? (debugging) mk Python 0 02-11-2010 04:17 PM
Exception of type 'System.Web.HttpUnhandledException' wasthrown.Exception has been thrown by the target of an invocation.System.WebSystem.Exception jobs ASP .Net 1 11-16-2007 05:57 PM
Viewstate wont turn off even after setting it to off ! robert112 ASP .Net 1 04-26-2007 01:51 AM
while executing my client program i get the exception javax.naming.LinkException: [Root exception is javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining if plz anybody know how to solve this problem then mahesh Java 0 03-08-2007 12:26 PM



Advertisments