SFML community forums

Help => General => Topic started by: Clairvoire on September 19, 2011, 11:25:38 pm

Title: Can SFML operate with C++ Exceptions disabled
Post by: Clairvoire on September 19, 2011, 11:25:38 pm
Does SFML depend on C++ exceptions in such a way that if I disable them, it will hinder it's ability to work?  I went over the code and found no place where they were used, but I wanted to make sure.
Title: Can SFML operate with C++ Exceptions disabled
Post by: OniLinkPlus on September 20, 2011, 12:32:23 am
I think Laurent specifically avoided exceptions so that bindings would be possible.
Title: Can SFML operate with C++ Exceptions disabled
Post by: Clairvoire on September 20, 2011, 02:05:05 am
Ah, good to know!  Following the Google code style guide, and it expressly forbids C++ exceptions.  

Thanks!
Title: Can SFML operate with C++ Exceptions disabled
Post by: Disch on September 20, 2011, 04:26:43 am
There's nothing wrong with exceptions when used properly.  Any guide that outright forbids them is not one that I would take to heart.
Title: Can SFML operate with C++ Exceptions disabled
Post by: thePyro_13 on September 20, 2011, 05:07:47 am
Do you understand the reason they don't use exceptions(because it would conflict to much with their older non-exception code)?

They even state that projects which do not need to tie into their existing systems are free to use exceptions, and that given their time again, they would prefer to use exceptions everywhere.

Just keep in mind, some of the stuff in their guide really doesn't apply to anyone but Google.

Not that it makes a difference for SMFL anyway. Just some food for thought encase you would otherwise want to use exceptions.