Skip to content

Commit 8068ff8

Browse files
committed
tidy includes
1 parent f883e5c commit 8068ff8

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

include/jsoncons/config/compiler_support.hpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,5 +472,18 @@ namespace binary {
472472

473473
} // namespace binary
474474
} // namespace jsoncons
475+
// allow to disable exceptions
476+
477+
#if !defined(JSONCONS_NO_EXCEPTIONS)
478+
#define JSONCONS_THROW(exception) throw exception
479+
#define JSONCONS_RETHROW throw
480+
#define JSONCONS_TRY try
481+
#define JSONCONS_CATCH(exception) catch(exception)
482+
#else
483+
#define JSONCONS_THROW(exception) std::terminate()
484+
#define JSONCONS_RETHROW std::terminate()
485+
#define JSONCONS_TRY if (true)
486+
#define JSONCONS_CATCH(exception) if (false)
487+
#endif
475488

476489
#endif // JSONCONS_CONFIG_COMPILER_SUPPORT_HPP

include/jsoncons/config/jsoncons_config.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,6 @@
1717

1818
#include <jsoncons/config/compiler_support.hpp>
1919

20-
// allow to disable exceptions
21-
#if !defined(JSONCONS_NO_EXCEPTIONS)
22-
#define JSONCONS_THROW(exception) throw exception
23-
#define JSONCONS_RETHROW throw
24-
#define JSONCONS_TRY try
25-
#define JSONCONS_CATCH(exception) catch(exception)
26-
#else
27-
#define JSONCONS_THROW(exception) std::terminate()
28-
#define JSONCONS_RETHROW std::terminate()
29-
#define JSONCONS_TRY if (true)
30-
#define JSONCONS_CATCH(exception) if (false)
31-
#endif
32-
3320
namespace jsoncons {
3421

3522
class assertion_error : public std::runtime_error

0 commit comments

Comments
 (0)