Skip to content

Commit 1af8bc8

Browse files
committedMar 9, 2024
[FORK][FIX] Compilation with new C++ standards
1 parent 52e6967 commit 1af8bc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/common/cpp_compat.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ namespace cpp_compat {
3030
// contains a compatibility layer for such C++ features.
3131

3232
// Older than C++17.
33-
#if defined(__cplusplus) && __cplusplus < 201703L
33+
#if defined(__cplusplus) && __cplusplus < 201703L || defined(_MSVC_LANG) && _MSVC_LANG < 201703L
3434
inline int uncaught_exceptions() {
3535
return (int)std::uncaught_exception();
3636
}
3737

3838
template <class F, class... ArgTypes>
39-
using invoke_result = std::result_of<F(ArgTypes...)>;
39+
using invoke_result = typename std::result_of<F(ArgTypes...)>;
4040
#else
4141

4242
inline int uncaught_exceptions() {

0 commit comments

Comments
 (0)