Skip to content

Commit

Permalink
fix(Exception): static assert to make sure that _HAS_EXCEPTIONS is set (
Browse files Browse the repository at this point in the history
  • Loading branch information
matejk committed Oct 4, 2024
1 parent aab4058 commit d07831a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Foundation/include/Poco/Exception.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,15 @@ class Foundation_API Exception: public std::exception
private:
std::string _msg;
Exception* _pNested;
int _code;
int _code;
};

#if defined(_HAS_EXCEPTIONS)
// Size of Poco::Exception depends on the exception settings (like _HAS_EXCEPTIONS)
// that might influence size of std::exception from which Poco::Exception is derived from.
// It is expected that Poco libraries and application using Poco have the same settings.
static_assert(_HAS_EXCEPTIONS != 0);
#endif

//
// inlines
Expand Down

0 comments on commit d07831a

Please sign in to comment.