forked from pantor/inja
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix inclusion in translation units with exceptions disabled. (pantor#196
) If exceptions are disabled via `-fno-exceptions` or `INJA_NOEXCEPTION`, the use of try-catch is disallowed by the compiler. This patch makes does two things: * Gates the use of try-catch in one translation unit on the definition of `INJA_NOEXCEPTION`. * Make it such that translation units compiled with `-fno-exceptions` but no `INJA_NOEXCEPTION` implicitly sets `INJA_NOEXCEPTION`. In the specific case of `ifstream::open`, setting the exceptions bits without exceptions enabled should trip an assertion just like INJA_ABORT. The nice message will not be present however, but that is absent when using INJA_ABORT as well. After this patch, inja can be successfully included without issue.
- Loading branch information
1 parent
4d5a7d1
commit 2491980
Showing
3 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters