update single

This commit is contained in:
ThePhD 2018-02-22 18:34:07 -05:00
parent e8a8da0b29
commit 32cadc0990
2 changed files with 9 additions and 4 deletions

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2018-02-22 19:49:01.759217 UTC // Generated 2018-02-22 23:33:52.230658 UTC
// This header was generated with sol v2.19.4 (revision f7f94a4) // This header was generated with sol v2.19.4 (revision e8a8da0)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_HPP #ifndef SOL_SINGLE_INCLUDE_HPP
@ -17141,10 +17141,15 @@ namespace sol {
template <typename T, typename Regs, meta::enable<meta::has_size<T>> = meta::enabler> template <typename T, typename Regs, meta::enable<meta::has_size<T>> = meta::enabler>
inline void make_length_op(Regs& l, int& index) { inline void make_length_op(Regs& l, int& index) {
const char* name = to_string(meta_function::length).c_str();
#ifdef __clang__
l[index] = luaL_Reg{ name, &c_call<decltype(&T::size), &T::size> };
#else
typedef decltype(std::declval<T>().size()) R; typedef decltype(std::declval<T>().size()) R;
using sz_func = R(T::*)()const; using sz_func = R(T::*)()const;
const char* name = to_string(meta_function::length).c_str(); const char* name = to_string(meta_function::length).c_str();
l[index] = luaL_Reg{ name, &c_call<decltype(static_cast<sz_func>(&T::size)), static_cast<sz_func>(&T::size)> }; l[index] = luaL_Reg{ name, &c_call<decltype(static_cast<sz_func>(&T::size)), static_cast<sz_func>(&T::size)> };
#endif
++index; ++index;
} }

View File

@ -20,8 +20,8 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// This file was generated with a script. // This file was generated with a script.
// Generated 2018-02-22 19:49:02.041252 UTC // Generated 2018-02-22 23:33:52.546198 UTC
// This header was generated with sol v2.19.4 (revision f7f94a4) // This header was generated with sol v2.19.4 (revision e8a8da0)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP