Add push function, update single

This commit is contained in:
ThePhD 2018-02-04 19:23:24 -05:00
parent 8f6f12d26c
commit c9980bfc28
3 changed files with 736 additions and 411 deletions

File diff suppressed because it is too large Load Diff

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-01-31 02:05:24.772464 UTC // Generated 2018-02-05 00:23:04.726719 UTC
// This header was generated with sol v2.19.0 (revision 49d99d1) // This header was generated with sol v2.19.0 (revision 8f6f12d)
// https://github.com/ThePhD/sol2 // https://github.com/ThePhD/sol2
#ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP
@ -45,19 +45,6 @@
#endif // compiler-specific checks #endif // compiler-specific checks
#endif // C++17 only #endif // C++17 only
#if defined(_WIN32) || defined(_MSC_VER)
#ifndef SOL_CODECVT_SUPPORT
#define SOL_CODECVT_SUPPORT 1
#endif // sol codecvt support
#elif defined(__GNUC__)
#if __GNUC__ >= 5
#ifndef SOL_CODECVT_SUPPORT
#define SOL_CODECVT_SUPPORT 1
#endif // codecvt support
#endif // g++ 5.x.x (MinGW too)
#else
#endif // Windows/VC++ vs. g++ vs Others
#ifdef _MSC_VER #ifdef _MSC_VER
#if defined(_DEBUG) && !defined(NDEBUG) #if defined(_DEBUG) && !defined(NDEBUG)
@ -162,6 +149,10 @@
#endif // SOL_UNORDERED_MAP_COMPATIBLE_HASH #endif // SOL_UNORDERED_MAP_COMPATIBLE_HASH
#endif // Boost has unordered_map with Compatible Key and CompatibleHash #endif // Boost has unordered_map with Compatible Key and CompatibleHash
#ifndef SOL_STACK_STRING_OPTIMIZATION_SIZE
#define SOL_STACK_STRING_OPTIMIZATION_SIZE 1024
#endif // Optimized conversion routines using a KB or so off the stack
// end of sol/feature_test.hpp // end of sol/feature_test.hpp
namespace sol { namespace sol {

View File

@ -94,6 +94,10 @@ namespace sol {
return set(std::move(other)); return set(std::move(other));
} }
int push() const noexcept {
return get<reference>().push(L);
}
template <typename T> template <typename T>
decltype(auto) get() const { decltype(auto) get() const {
return tuple_get<T>(std::make_index_sequence<std::tuple_size<meta::unqualified_t<key_type>>::value>()); return tuple_get<T>(std::make_index_sequence<std::tuple_size<meta::unqualified_t<key_type>>::value>());
@ -126,7 +130,11 @@ namespace sol {
template <typename... Ret, typename... Args> template <typename... Ret, typename... Args>
decltype(auto) call(Args&&... args) { decltype(auto) call(Args&&... args) {
#ifdef SOL_SAFE_FUNCTION
return get<protected_function>().template call<Ret...>(std::forward<Args>(args)...);
#else
return get<function>().template call<Ret...>(std::forward<Args>(args)...); return get<function>().template call<Ret...>(std::forward<Args>(args)...);
#endif // Safe function usage
} }
template <typename... Args> template <typename... Args>