From 2d47fc09c37a4e1e7362a049b689d772ddbb5304 Mon Sep 17 00:00:00 2001 From: Patryk Czachurski Date: Sun, 28 Oct 2018 14:47:46 +0100 Subject: [PATCH] Inside sol::proxy::call, check if we're building with clang If building with clang on Windows, it tries to imitate MSVC by specifying reasonable _MSC_VER defines. This makes sol2 compile MSVC version of sol::proxy::call (without the "template" preffix) that is nevertheless not accepted by clang. This commit fixes the problem by also checking if "__clang__" is defined. --- sol/proxy.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sol/proxy.hpp b/sol/proxy.hpp index 841fb1e5..6b68cd81 100644 --- a/sol/proxy.hpp +++ b/sol/proxy.hpp @@ -126,7 +126,7 @@ namespace sol { template decltype(auto) call(Args&&... args) { -#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 191200000 +#if !defined(__clang__) && defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 191200000 // MSVC is ass sometimes return get().call(std::forward(args)...); #else