diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 17353016..26ac864c 100644 --- a/single/sol/sol.hpp +++ b/single/sol/sol.hpp @@ -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 2018-06-27 15:33:51.932186 UTC -// This header was generated with sol v2.20.4 (revision 60ee53a) +// Generated 2018-08-04 15:02:30.421859 UTC +// This header was generated with sol v2.20.3 (revision daa9993) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -1196,6 +1196,7 @@ namespace sol { #include #include #include +#include #include #include @@ -4437,7 +4438,7 @@ namespace sol { static void construct(T&& obj, Args&&... args) { typedef meta::unqualified_t Tu; std::allocator alloc{}; - std::allocator_traits>::construct(alloc, obj, std::forward(args)...); + std::allocator_traits>::construct(alloc, std::forward(obj), std::forward(args)...); } template @@ -4553,8 +4554,6 @@ namespace sol { // beginning of sol/filters.hpp -#include - namespace sol { namespace detail { struct filter_base_tag {}; @@ -5626,6 +5625,12 @@ namespace sol { template class V, typename T, typename... Args> struct accumulate : accumulate::value, V, Args...> {}; + + template class V, typename List> + struct accumulate_list; + + template class V, typename... Args> + struct accumulate_list> : accumulate {}; } // namespace detail template @@ -5732,9 +5737,9 @@ namespace sol { public: typedef std::integral_constant::value != 0> runtime_variadics_t; static const std::size_t true_arity = base_t::arity; - static const std::size_t arity = base_t::arity - meta::count_for::value; + static const std::size_t arity = detail::accumulate_list::value - meta::count_for::value; static const std::size_t true_free_arity = base_t::free_arity; - static const std::size_t free_arity = base_t::free_arity - meta::count_for::value; + static const std::size_t free_arity = detail::accumulate_list::value - meta::count_for::value; }; template @@ -8250,9 +8255,9 @@ namespace stack { if (!success) { // expected type, actual type #if defined(SOL_STRINGS_ARE_NUMBERS) && SOL_STRINGS_ARE_NUMBERS - handler(L, index, type::number, t, "not a numeric type"); -#else handler(L, index, type::number, type_of(L, index), "not a numeric type or numeric string"); +#else + handler(L, index, type::number, t, "not a numeric type"); #endif } return success; @@ -16450,6 +16455,21 @@ namespace sol { static const bool value = sizeof(test(0)) == sizeof(char); }; + template + struct has_traits_size_test { + private: + typedef std::array one; + typedef std::array two; + + template + static one test(decltype(&C::size)); + template + static two test(...); + + public: + static const bool value = sizeof(test(0)) == sizeof(char); + }; + template using has_clear = meta::boolean::value>; @@ -16493,7 +16513,7 @@ namespace sol { using has_traits_add = meta::boolean::value>; template - using has_traits_size = meta::has_size; + using has_traits_size = meta::boolean::value>; template using has_traits_clear = has_clear; diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index fe2766a1..2b821d48 100644 --- a/single/sol/sol_forward.hpp +++ b/single/sol/sol_forward.hpp @@ -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 2018-06-27 15:33:52.214419 UTC -// This header was generated with sol v2.20.4 (revision 60ee53a) +// Generated 2018-08-04 15:02:30.657205 UTC +// This header was generated with sol v2.20.3 (revision daa9993) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/sol/stack_check_unqualified.hpp b/sol/stack_check_unqualified.hpp index 30921540..9b8bf79c 100644 --- a/sol/stack_check_unqualified.hpp +++ b/sol/stack_check_unqualified.hpp @@ -149,9 +149,9 @@ namespace stack { if (!success) { // expected type, actual type #if defined(SOL_STRINGS_ARE_NUMBERS) && SOL_STRINGS_ARE_NUMBERS - handler(L, index, type::number, t, "not a numeric type"); -#else handler(L, index, type::number, type_of(L, index), "not a numeric type or numeric string"); +#else + handler(L, index, type::number, t, "not a numeric type"); #endif } return success; diff --git a/sol/types.hpp b/sol/types.hpp index 8357fa55..90efe329 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -1046,6 +1046,12 @@ namespace sol { template class V, typename T, typename... Args> struct accumulate : accumulate::value, V, Args...> {}; + + template class V, typename List> + struct accumulate_list; + + template class V, typename... Args> + struct accumulate_list> : accumulate {}; } // namespace detail template @@ -1152,9 +1158,9 @@ namespace sol { public: typedef std::integral_constant::value != 0> runtime_variadics_t; static const std::size_t true_arity = base_t::arity; - static const std::size_t arity = base_t::arity - meta::count_for::value; + static const std::size_t arity = detail::accumulate_list::value - meta::count_for::value; static const std::size_t true_free_arity = base_t::free_arity; - static const std::size_t free_arity = base_t::free_arity - meta::count_for::value; + static const std::size_t free_arity = detail::accumulate_list::value - meta::count_for::value; }; template