Closed seanmiddleditch closed 1 year ago
The following error arises when compiling with MSVC (17.5.0 Preview 2.0) with /W4:
/W4
...\dragonbox-src\include\dragonbox\dragonbox.h(662): warning C4702: unreachable code
The line in for the warning is: https://github.com/jk-jeon/dragonbox/blob/4b195789bd4c995ea80ce5a65d6c145c70ae9a6b/include/dragonbox/dragonbox.h#L662
However, that isn't the real problem. The warning is actually triggered by the whole second if constexpr block at: https://github.com/jk-jeon/dragonbox/blob/4b195789bd4c995ea80ce5a65d6c145c70ae9a6b/include/dragonbox/dragonbox.h#L657
if constexpr
Changing that second if constexpr to else if constexpr resolves the warning.
else if constexpr
The following error arises when compiling with MSVC (17.5.0 Preview 2.0) with
/W4
:The line in for the warning is: https://github.com/jk-jeon/dragonbox/blob/4b195789bd4c995ea80ce5a65d6c145c70ae9a6b/include/dragonbox/dragonbox.h#L662
However, that isn't the real problem. The warning is actually triggered by the whole second
if constexpr
block at: https://github.com/jk-jeon/dragonbox/blob/4b195789bd4c995ea80ce5a65d6c145c70ae9a6b/include/dragonbox/dragonbox.h#L657Changing that second
if constexpr
toelse if constexpr
resolves the warning.