Fix #625
Fix #624
This commit is contained in:
ThePhD 2018-04-12 13:58:25 -04:00
parent 81912b6dd4
commit 80df3fc915
22 changed files with 39 additions and 23 deletions

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
@ -257,11 +257,11 @@ if (DO_TESTS OR DO_EXAMPLES)
# Here, we pull in all the necessary libraries for building examples and tests
# Find threading library
if (NOT MSVC)
if (IS_X86)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
set(CMAKE_EXECUTABLE_LINKER_FLAGS "${CMAKE_EXECUTABLE_LINKER_FLAGS} -m32")
if (IS_X86)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
set(CMAKE_EXECUTABLE_LINKER_FLAGS "${CMAKE_EXECUTABLE_LINKER_FLAGS} -m32")
endif()
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -2,7 +2,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in

View File

@ -40,6 +40,13 @@
#define SOL_NOEXCEPT_FUNCTION_TYPE 1
#endif // noexcept is part of a function's type
#endif // compiler-specific checks
#if defined(__clang__) && defined(__APPLE__)
#if __has_include && __has_include(<variant>)
#define SOL_STD_VARIANT 1
#endif // has include nonsense
#else
#define SOL_STD_VARIANT 1
#endif // Clang screws up variant
#endif // C++17 only
#ifdef _MSC_VER

View File

@ -122,7 +122,7 @@ namespace sol {
template <typename... Ret, typename... Args>
decltype(auto) call(Args&&... args) {
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER <= 191326128 && _MSC_FULL_VER >= 191200000
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER <= 191326131 && _MSC_FULL_VER >= 191200000
// MSVC is ass sometimes
return get<protected_function>().call<Ret...>(std::forward<Args>(args)...);
#else

View File

@ -89,6 +89,7 @@ namespace sol {
detail::call_exception_handler(lua_state(), maybe_ex, error);
}
};
(void)onexcept;
#if !defined(SOL_EXCEPTIONS_SAFE_PROPAGATION) || defined(SOL_LUAJIT)
try {
#endif // Safe Exception Propagation

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 <= 191326128 && _MSC_FULL_VER >= 191200000
#if defined(_MSC_FULL_VER) && _MSC_FULL_VER <= 191326131 && _MSC_FULL_VER >= 191200000
// MSVC is ass sometimes
return get<function>().call<Ret...>(std::forward<Args>(args)...);
#else

View File

@ -38,7 +38,9 @@
#include <cmath>
#ifdef SOL_CXX17_FEATURES
#include <string_view>
#ifdef SOL_STD_VARIANT
#include <variant>
#endif // Apple clang screwed up
#endif // C++17
namespace sol {
@ -841,6 +843,7 @@ namespace stack {
};
#ifdef SOL_CXX17_FEATURES
#ifdef SOL_STD_VARIANT
template <typename... Tn>
struct getter<std::variant<Tn...>> {
typedef std::variant<Tn...> V;
@ -876,6 +879,7 @@ namespace stack {
return get_one(std::integral_constant<std::size_t, V_size::value>(), L, index, tracking);
}
};
#endif // Apple Clang screwed up
#endif // C++17-wave
}
} // namespace sol::stack

View File

@ -37,7 +37,9 @@
#include <limits>
#ifdef SOL_CXX17_FEATURES
#include <string_view>
#ifdef SOL_STD_VARIANT
#include <variant>
#endif // Can use variant
#endif // C++17
namespace sol {
@ -987,6 +989,7 @@ namespace stack {
};
#ifdef SOL_CXX17_FEATURES
#ifdef SOL_STD_VARIANT
namespace stack_detail {
struct push_function {
@ -1014,6 +1017,7 @@ namespace stack {
return std::visit(stack_detail::push_function(L), std::move(v));
}
};
#endif // Variant because Clang is terrible
#endif // C++17 Support
}
} // namespace sol::stack

View File

@ -1,7 +1,7 @@
# # # # sol2
# The MIT License (MIT)
#
# Copyright (c) 2013-2017 Rapptz, ThePhD, and contributors
# Copyright (c) 2013-2018 Rapptz, ThePhD, and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in