Skip to content

Commit 51aa9c8

Browse files
committed
Fix C++ version check for coroutine support in MSVC
1 parent b11c93a commit 51aa9c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

httplib.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12885,7 +12885,7 @@ inline SSL_CTX *Client::ssl_context() const {
1288512885
* When C++23 is adopted, Generator<T> can be replaced with std::generator<T>.
1288612886
*/
1288712887

12888-
#if __cplusplus >= 202002L
12888+
#if __cplusplus >= 202002L || (defined(_MSVC_LANG) && _MSVC_LANG >= 202002L)
1288912889

1289012890
#include <coroutine>
1289112891
#include <string_view>
@@ -13311,6 +13311,6 @@ inline Result Options(ClientType &cli, const std::string &path,
1331113311

1331213312
} // namespace httplib
1331313313

13314-
#endif // __cplusplus >= 202002L
13314+
#endif // __cplusplus >= 202002L || _MSVC_LANG >= 202002L
1331513315

1331613316
#endif // CPPHTTPLIB_HTTPLIB_H

0 commit comments

Comments
 (0)