mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
x64 build fixes
This commit is contained in:
parent
1293213775
commit
f62c53f155
3758
nonius/nonius.h++
3758
nonius/nonius.h++
File diff suppressed because one or more lines are too long
|
@ -33,7 +33,7 @@ struct overloaded_function : base_function {
|
||||||
overloads_t overloads;
|
overloads_t overloads;
|
||||||
|
|
||||||
overloaded_function(Functions... fxs)
|
overloaded_function(Functions... fxs)
|
||||||
: overloads({ function_traits<Unqualified<Functions>>::arity, fxs }...) {
|
: overloads({ static_cast<int>(function_traits<Unqualified<Functions>>::arity), fxs }...) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ struct usertype_overloaded_function : base_function {
|
||||||
|
|
||||||
|
|
||||||
usertype_overloaded_function(Functions... fxs)
|
usertype_overloaded_function(Functions... fxs)
|
||||||
: overloads({function_traits<Functions>::arity, fxs}...) {
|
: overloads({static_cast<int>(function_traits<Functions>::arity), fxs}...) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,7 +154,7 @@ struct usertype_indexing_function<overload_set<Functions...>, T> : base_function
|
||||||
: usertype_indexing_function(std::move(name), std::get<In>(set)...) {}
|
: usertype_indexing_function(std::move(name), std::get<In>(set)...) {}
|
||||||
|
|
||||||
usertype_indexing_function(std::string name, Functions... fxs)
|
usertype_indexing_function(std::string name, Functions... fxs)
|
||||||
: overloads({function_traits<Functions>::arity, fxs}...), name(std::move(name)) {}
|
: overloads({static_cast<int>(function_traits<Functions>::arity), fxs}...), name(std::move(name)) {}
|
||||||
|
|
||||||
int match_arity(std::index_sequence<>, lua_State*, std::ptrdiff_t) {
|
int match_arity(std::index_sequence<>, lua_State*, std::ptrdiff_t) {
|
||||||
throw error("no matching function call takes this number of arguments");
|
throw error("no matching function call takes this number of arguments");
|
||||||
|
|
|
@ -147,11 +147,6 @@ private:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<std::size_t N>
|
|
||||||
void build_cleanup() {
|
|
||||||
cleanup = &base_function::usertype<N>::gc;
|
|
||||||
}
|
|
||||||
|
|
||||||
template<std::size_t N>
|
template<std::size_t N>
|
||||||
void build_function_tables(function_map_t*& index, function_map_t*& newindex) {
|
void build_function_tables(function_map_t*& index, function_map_t*& newindex) {
|
||||||
int extracount = 0;
|
int extracount = 0;
|
||||||
|
@ -195,14 +190,14 @@ private:
|
||||||
}
|
}
|
||||||
switch(extracount) {
|
switch(extracount) {
|
||||||
case 2:
|
case 2:
|
||||||
build_cleanup<N + 2>();
|
cleanup = &base_function::usertype<N + 2>::gc;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
build_cleanup<N + 1>();
|
cleanup = &base_function::usertype<N + 1>::gc;
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
build_cleanup<N + 0>();
|
cleanup = &base_function::usertype<N + 0>::gc;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -318,18 +313,6 @@ public:
|
||||||
template<typename... Args>
|
template<typename... Args>
|
||||||
usertype(Args&&... args): usertype(default_constructor, std::forward<Args>(args)...) {}
|
usertype(Args&&... args): usertype(default_constructor, std::forward<Args>(args)...) {}
|
||||||
|
|
||||||
template<typename... Args>
|
|
||||||
SOL_DEPRECATED usertype(std::string, std::string, Args&&... args): usertype(default_constructor, std::forward<Args>(args)...) {}
|
|
||||||
|
|
||||||
template<typename... Args>
|
|
||||||
SOL_DEPRECATED usertype(const char*, std::string, Args&&... args): usertype(default_constructor, std::forward<Args>(args)...) {}
|
|
||||||
|
|
||||||
template<typename... Args, typename... CArgs>
|
|
||||||
SOL_DEPRECATED usertype(std::string, constructors<CArgs...> c, Args&&... args) : usertype(std::move(c), std::forward<Args>(args)...) {}
|
|
||||||
|
|
||||||
template<typename... Args, typename... CArgs>
|
|
||||||
SOL_DEPRECATED usertype(const char*, constructors<CArgs...> c, Args&&... args) : usertype(std::move(c), std::forward<Args>(args)...) {}
|
|
||||||
|
|
||||||
template<typename... Args, typename... CArgs>
|
template<typename... Args, typename... CArgs>
|
||||||
usertype(constructors<CArgs...>, Args&&... args) {
|
usertype(constructors<CArgs...>, Args&&... args) {
|
||||||
functionnames.reserve(sizeof...(args) + 2);
|
functionnames.reserve(sizeof...(args) + 2);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user