boostorg / exception

Boost.org exception module
http://boost.org/libs/exception
Boost Software License 1.0
15 stars 46 forks source link

Unreal Engine 5 build error #47

Closed egorpugin closed 1 year ago

egorpugin commented 1 year ago

https://github.com/boostorg/exception/blob/develop/include/boost/exception/detail/exception_ptr.hpp#L29

All lines with GNUC ifdef like this fails with error:

boost\exception\exception.hpp(22): error C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
boost\exception\exception.hpp(22): error C4668: '__GNUC_MINOR__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

Possible fix - https://github.com/boostorg/smart_ptr/pull/98 Such change should be implemented with all occurences of __GNUC__

Probably this repo is also affected. https://github.com/boostorg/throw_exception

zajo commented 1 year ago

This is likely due to excessive warnings level. It is standard and correct behavior that undefined macros used in preprocessor expressions evaluate to 0.