Skip to content

Commit

Permalink
Preprocessor fixes for xtl_config.hpp
Browse files Browse the repository at this point in the history
Avoid re-#defines of XTL_NO_EXCEPTIONS
Properly #include <iostream> for XTL_NO_EXCEPTIONS
  • Loading branch information
laramiel authored Jan 10, 2024
1 parent a7c1c54 commit 2ebf99f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/xtl/xtl_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,16 @@
#if (defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)) && !defined(XTL_NO_EXCEPTIONS)
// Exceptions are enabled.
#else
#if !defined(XTL_NO_EXCEPTIONS)
// Exceptions are disabled.
#define XTL_NO_EXCEPTIONS
#endif
#endif

#if defined(XTL_NO_EXCEPTIONS)

#include <iostream>

#define XTL_THROW(_, msg) \
{ \
std::cerr << msg << std::endl; \
Expand Down

0 comments on commit 2ebf99f

Please sign in to comment.