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.
This commit is contained in:
Patryk Czachurski 2018-10-28 14:47:46 +01:00 committed by The Phantom Derpstorm
parent 2a91f2416a
commit 2d47fc09c3

View File

@ -126,7 +126,7 @@ namespace sol {
template <typename... Ret, typename... Args>
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<function>().call<Ret...>(std::forward<Args>(args)...);
#else