mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
trying to pin this error down...
This commit is contained in:
parent
644a5c549b
commit
4f7f1af515
|
@ -20,8 +20,8 @@
|
|||
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// This file was generated with a script.
|
||||
// Generated 2017-08-11 13:58:32.882633 UTC
|
||||
// This header was generated with sol v2.18.0 (revision 10a59b2)
|
||||
// Generated 2017-08-11 14:21:00.571402 UTC
|
||||
// This header was generated with sol v2.18.0 (revision 644a5c5)
|
||||
// https://github.com/ThePhD/sol2
|
||||
|
||||
#ifndef SOL_SINGLE_INCLUDE_HPP
|
||||
|
@ -14091,7 +14091,7 @@ namespace sol {
|
|||
}
|
||||
|
||||
template <typename T, typename Op>
|
||||
inline int operator_wrap(lua_State* L) {
|
||||
int operator_wrap(lua_State* L) {
|
||||
auto maybel = stack::check_get<T>(L, 1);
|
||||
if (maybel) {
|
||||
auto mayber = stack::check_get<T>(L, 2);
|
||||
|
@ -14112,7 +14112,8 @@ namespace sol {
|
|||
|
||||
template <typename T, typename Op, typename Supports, typename Regs, meta::enable<Supports> = meta::enabler>
|
||||
inline void make_reg_op(Regs& l, int& index, const char* name) {
|
||||
l[index] = luaL_Reg{ name, &c_call<decltype(&operator_wrap<T, Op>), &operator_wrap<T, Op>> };
|
||||
lua_CFunction f = &detail::static_trampoline<&operator_wrap<T, Op>>;
|
||||
l[index] = luaL_Reg{ name, f };
|
||||
++index;
|
||||
}
|
||||
|
||||
|
@ -14124,7 +14125,8 @@ namespace sol {
|
|||
template <typename T, typename Supports, typename Regs, meta::enable<Supports> = meta::enabler>
|
||||
inline void make_to_string_op(Regs& l, int& index) {
|
||||
const char* name = to_string(meta_function::to_string).c_str();
|
||||
l[index] = luaL_Reg{ name, &c_call<decltype(&default_to_string<T>), &default_to_string<T>> };
|
||||
lua_CFunction f = &detail::static_trampoline<&default_to_string<T>>;
|
||||
l[index] = luaL_Reg{ name, f };
|
||||
++index;
|
||||
}
|
||||
|
||||
|
@ -14136,7 +14138,8 @@ namespace sol {
|
|||
template <typename T, typename Regs, meta::enable<meta::has_deducible_signature<T>> = meta::enabler>
|
||||
inline void make_call_op(Regs& l, int& index) {
|
||||
const char* name = to_string(meta_function::call).c_str();
|
||||
l[index] = luaL_Reg{ name, &c_call<decltype(&T::operator()), &T::operator()> };
|
||||
lua_CFunction f = &c_call<decltype(&T::operator()), &T::operator()>;
|
||||
l[index] = luaL_Reg{ name, f };
|
||||
++index;
|
||||
}
|
||||
|
||||
|
|
|
@ -411,7 +411,7 @@ namespace sol {
|
|||
}
|
||||
|
||||
template <typename T, typename Op>
|
||||
inline int operator_wrap(lua_State* L) {
|
||||
int operator_wrap(lua_State* L) {
|
||||
auto maybel = stack::check_get<T>(L, 1);
|
||||
if (maybel) {
|
||||
auto mayber = stack::check_get<T>(L, 2);
|
||||
|
@ -432,7 +432,8 @@ namespace sol {
|
|||
|
||||
template <typename T, typename Op, typename Supports, typename Regs, meta::enable<Supports> = meta::enabler>
|
||||
inline void make_reg_op(Regs& l, int& index, const char* name) {
|
||||
l[index] = luaL_Reg{ name, &c_call<decltype(&operator_wrap<T, Op>), &operator_wrap<T, Op>> };
|
||||
lua_CFunction f = &detail::static_trampoline<&operator_wrap<T, Op>>;
|
||||
l[index] = luaL_Reg{ name, f };
|
||||
++index;
|
||||
}
|
||||
|
||||
|
@ -444,7 +445,8 @@ namespace sol {
|
|||
template <typename T, typename Supports, typename Regs, meta::enable<Supports> = meta::enabler>
|
||||
inline void make_to_string_op(Regs& l, int& index) {
|
||||
const char* name = to_string(meta_function::to_string).c_str();
|
||||
l[index] = luaL_Reg{ name, &c_call<decltype(&default_to_string<T>), &default_to_string<T>> };
|
||||
lua_CFunction f = &detail::static_trampoline<&default_to_string<T>>;
|
||||
l[index] = luaL_Reg{ name, f };
|
||||
++index;
|
||||
}
|
||||
|
||||
|
@ -456,7 +458,8 @@ namespace sol {
|
|||
template <typename T, typename Regs, meta::enable<meta::has_deducible_signature<T>> = meta::enabler>
|
||||
inline void make_call_op(Regs& l, int& index) {
|
||||
const char* name = to_string(meta_function::call).c_str();
|
||||
l[index] = luaL_Reg{ name, &c_call<decltype(&T::operator()), &T::operator()> };
|
||||
lua_CFunction f = &c_call<decltype(&T::operator()), &T::operator()>;
|
||||
l[index] = luaL_Reg{ name, f };
|
||||
++index;
|
||||
}
|
||||
|
||||
|
|
|
@ -1015,10 +1015,10 @@ end
|
|||
print(mop)
|
||||
)");
|
||||
}());
|
||||
{
|
||||
const my_object& mo = lua["mop"];
|
||||
REQUIRE_NOTHROW([&]() {
|
||||
my_object& mo = lua["mop"];
|
||||
REQUIRE((&mo == my_object::last_printed));
|
||||
}
|
||||
}());
|
||||
#endif
|
||||
REQUIRE_NOTHROW([&]() {
|
||||
lua.safe_script(R"(
|
||||
|
@ -1028,10 +1028,12 @@ c_iterable = mo:iterable()
|
|||
)");
|
||||
}());
|
||||
|
||||
REQUIRE_NOTHROW([&]() {
|
||||
my_object& mo = lua["c_mo"];
|
||||
my_object& mo_iterable = lua["c_iterable"];
|
||||
REQUIRE(&mo == &mo_iterable);
|
||||
REQUIRE(mo == mo_iterable);
|
||||
}());
|
||||
|
||||
REQUIRE_NOTHROW([&]() {
|
||||
lua.safe_script(R"(
|
||||
|
@ -1042,6 +1044,7 @@ s1_iterable_len = #c_iterable
|
|||
)");
|
||||
}());
|
||||
|
||||
REQUIRE_NOTHROW([&]() {
|
||||
std::size_t s1 = lua["s1"];
|
||||
std::size_t s1_len = lua["s1_len"];
|
||||
std::size_t s1_iterable = lua["s1_iterable"];
|
||||
|
@ -1050,6 +1053,7 @@ s1_iterable_len = #c_iterable
|
|||
REQUIRE(s1 == s1_len);
|
||||
REQUIRE(s1 == s1_iterable_len);
|
||||
REQUIRE(s1_iterable == s1_iterable_len);
|
||||
}());
|
||||
|
||||
REQUIRE_NOTHROW([&]() {
|
||||
lua.safe_script(R"(
|
||||
|
@ -1073,16 +1077,20 @@ print(mo)
|
|||
)");
|
||||
}());
|
||||
|
||||
REQUIRE_NOTHROW([&]() {
|
||||
int v1 = lua["v1"];
|
||||
std::size_t s2 = lua["s2"];
|
||||
std::size_t s2_len = lua["s2_len"];
|
||||
std::size_t s2_iterable = lua["s2_iterable"];
|
||||
std::size_t s2_iterable_len = lua["s2_iterable_len"];
|
||||
|
||||
REQUIRE(v1 == 100);
|
||||
REQUIRE(s2 == 16);
|
||||
REQUIRE(s2 == s2_len);
|
||||
REQUIRE(s2 == s2_iterable_len);
|
||||
REQUIRE(s2_iterable == s2_iterable_len);
|
||||
}());
|
||||
REQUIRE_NOTHROW([&]() {
|
||||
my_object& mo = lua["mo"];
|
||||
REQUIRE(&mo == my_object::last_printed);
|
||||
}());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user