Fix unreachable code warning with MSVC

fixes #1582
closes #2035
This commit is contained in:
Richard Hodges
2020-07-23 11:54:37 +02:00
parent b07edea9d7
commit d04ff199bb
2 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
Version XXX:
* Fix unreachable code warning with MSVC.
* Fix logic error in advance_server_flex.
* Fix file open with append_existing flag on posix.
* Websocket SSL `teardown` also tears down underlying TCP.

View File

@ -52,7 +52,7 @@ public:
#if defined(_MSC_VER) && ! defined(__clang__)
# define BOOST_BEAST_UNREACHABLE() __assume(false)
# define BOOST_BEAST_UNREACHABLE_RETURN(v) __assume(false)
# define BOOST_BEAST_UNREACHABLE_RETURN(v) return v
#else
# define BOOST_BEAST_UNREACHABLE() __builtin_unreachable()
# define BOOST_BEAST_UNREACHABLE_RETURN(v) \