mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
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:
parent
2a91f2416a
commit
2d47fc09c3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user