Skip to content

Commit

Permalink
disable exceptions if -fno-exceptions flag is set
Browse files Browse the repository at this point in the history
  • Loading branch information
artpaul committed Jun 18, 2021
1 parent 98c3e9f commit 54f3bf0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion include/cxxopts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,22 @@ THE SOFTWARE.
# define CXXOPTS_NODISCARD
#endif

// Disable exceptions if the specific compiler flags are set.
#if !(defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND))
# define CXXOPTS_NO_EXCEPTIONS
#endif

#ifdef CXXOPTS_NO_EXCEPTIONS
# include <iostream>
#endif

#ifndef CXXOPTS_VECTOR_DELIMITER
# define CXXOPTS_VECTOR_DELIMITER ','
#endif

#define CXXOPTS__VERSION_MAJOR 5
#define CXXOPTS__VERSION_MINOR 0
#define CXXOPTS__VERSION_PATCH 1
#define CXXOPTS__VERSION_PATCH 2

namespace cxxopts {

Expand Down

0 comments on commit 54f3bf0

Please sign in to comment.