Using std::string with exceptions disabled

I'm developing in an environment that is very constrained on memory and thus C++ exception handling has been turned off. Does this mean I cannot use std::string because of exceptions it might throw? I'm not concerned about allocation exceptions but other exceptions. Is there a list of exceptions documented somewhere that I can review?
closed account (S6k9GNh0)
>.>, Why would a string throw an exception...Better yet, how would a string throw an exception.
Last edited on
I guess that is what I'm trying to find out. What exceptions can std::string throw? Are you saying that std::string will never throw an exception?
Your compiler should issue and error or atleast a warning if it encounters exception code and exceptions are disabled.
So, if I have two modules, one that was compiled with exceptions turned off and the other compiled with a throw and exceptions turned on, the linker should complain?
As with nearly everything, it depends on the system.

For example, Visual Studio linking a full win32 app can, but it won't for wince. This is because of it's "Safe Exception Handlers". I can't comment on any other system in this regard.
I guess I will have to give it a whirl. I'm developing on an ARM 9 environment running linux kernel 2.6.28.
Topic archived. No new replies allowed.