On 2020-01-29 12:11, dariomt--- via Boost wrote:
Right now BOOST_FORCEINLINE does not depend on NDEBUG.
This means that on Debug builds the code asks to be forced-inlined with optimizations disabled, which does not make much sense to me. This is reflected by a myriad warnings in msvc under level 4 warnings. In fact Multiprecision library works around this issue by defining their own macro BOOST_MP_FORCEINLINE which decays to just inline in Debug builds (boost/multiprecision/detail/number_base.hpp lines 25-29).
I think this behavior should be adopted by BOOST_FORCEINLINE. I'm happy to do a PR if there is agreement from maintainers.
Please, no. There is code (e.g. in Boost.Atomic) which requires inlining regardless of the release/debug mode. If a compiler emits warnings about it then the solution is to disable these warnings.