Merge commit 'c61a434561b863bab870873992c4ab23f963ca6c' into sol3

# Conflicts:
#	include/sol/types.hpp
This commit is contained in:
ThePhD 2018-11-21 15:45:17 -05:00
commit 8f73b92109
No known key found for this signature in database
GPG Key ID: 1509DB1C0F702BFA

View File

@ -51,6 +51,21 @@
#endif // Using Boost #endif // Using Boost
namespace sol { namespace sol {
namespace usertype_detail {
#if defined(SOL_USE_BOOST)
#if defined(SOL_CXX17_FEATURES)
template <typename K, typename V, typename H = std::hash<K>, typename E = std::equal_to<>>
using map_t = boost::unordered_map<K, V, H, E>;
#else
template <typename K, typename V, typename H = boost::hash<K>, typename E = std::equal_to<>>
using map_t = boost::unordered_map<K, V, H, E>;
#endif // C++17 or not, WITH boost
#else
template <typename K, typename V, typename H = std::hash<K>, typename E = std::equal_to<>>
using map_t = std::unordered_map<K, V, H, E>;
#endif // Boost map target
} // namespace usertype_detail
namespace detail { namespace detail {
#ifdef SOL_NOEXCEPT_FUNCTION_TYPE #ifdef SOL_NOEXCEPT_FUNCTION_TYPE
typedef int (*lua_CFunction_noexcept)(lua_State* L) noexcept; typedef int (*lua_CFunction_noexcept)(lua_State* L) noexcept;
@ -982,8 +997,10 @@ namespace sol {
template <typename T> template <typename T>
struct lua_type_of<optional<T>> : std::integral_constant<type, type::poly> {}; struct lua_type_of<optional<T>> : std::integral_constant<type, type::poly> {};
#if defined(SOL_CXX17_FEATURES) && SOL_CXX17_FEATURES
template <typename T> template <typename T>
struct lua_type_of<std::optional<T>> : std::integral_constant<type, type::poly> {}; struct lua_type_of<std::optional<T>> : std::integral_constant<type, type::poly> {};
#endif // std::optional
template <> template <>
struct lua_type_of<variadic_args> : std::integral_constant<type, type::poly> {}; struct lua_type_of<variadic_args> : std::integral_constant<type, type::poly> {};
@ -1124,6 +1141,10 @@ namespace sol {
struct is_lua_primitive<light<T>> : is_lua_primitive<T*> {}; struct is_lua_primitive<light<T>> : is_lua_primitive<T*> {};
template <typename T> template <typename T>
struct is_lua_primitive<optional<T>> : std::true_type {}; struct is_lua_primitive<optional<T>> : std::true_type {};
#if defined(SOL_CXX17_FEATURES) && SOL_CXX17_FEATURES
template <typename T>
struct is_lua_primitive<std::optional<T>> : std::true_type {};
#endif
template <typename T> template <typename T>
struct is_lua_primitive<as_table_t<T>> : std::true_type {}; struct is_lua_primitive<as_table_t<T>> : std::true_type {};
template <typename T> template <typename T>