C++ exceptions in my opinion (and in the opinion of others) are subpar and I usually have them turned off along with RTTI. However,
the presence of try/catch blocks in doctest causes warnings (at least on MSVC - C4530) which can't be suppressed (and I'm building with /W4 /WX so this breaks my build).
I simply deleted / commented out all usages of try/catch in the my copy of the library but it will be helpful to only use exceptions handling if the user's exceptions are enabled. This can be detected by checking for
introduced the DOCTEST_CONFIG_NO_EXCEPTIONS and DOCTEST_CONFIG_NO_TRY…
…_CATCH_IN_ASSERTS config identifiers
try the dev branch and let me know if everything works fine - also checkout these docs in the dev branch
U'll have to define DOCTEST_CONFIG_NO_EXCEPTIONS yourself because the auto detection using _HAS_EXCEPTIONS for MSVC requires that I include atleast 1 header (so vcruntime.h gets included). I could detect it sometimes - when the doctest header is not the first that is included in the translation unit (so _HAS_EXCEPTIONS is defined), but I decided to not complicate things.
@onqtam Works as expected!
- added the ability to compile code with assertions that need excepti…
…ons even without exceptions - see the use of DOCTEST_CONFIG_NO_EXCEPTIONS_BUT_WITH_ALL_ASSERTS
- added clang 3.9 to build matrix