From 862c01019a7df2656535e9615cb3add187f4e69d Mon Sep 17 00:00:00 2001 From: ThePhD Date: Sat, 4 Jul 2020 03:58:24 -0400 Subject: [PATCH] Use invoke_result_t to get rid of deprecated result_of_t (Fixes #986). Make thread local keyword optional by using a config macro SOL_NO_THREAD_LOCAL (off by default) (Fixes #979). Cannot do anything for #985; that's an architecture issue. --- cmake/Modules/FindLuaBuild/LuaVanilla.cmake | 12 +- include/sol/compatibility.hpp | 5 +- .../{version.hpp => lua_version.hpp} | 12 +- include/sol/config_setup.hpp | 29 - include/sol/feature_test.hpp | 2 +- include/sol/lua_value.hpp | 11 +- include/sol/resolve.hpp | 26 +- include/sol/stack_check_get_unqualified.hpp | 9 +- include/sol/stack_check_unqualified.hpp | 10 +- include/sol/stack_get_unqualified.hpp | 7 +- include/sol/stack_guard.hpp | 10 +- include/sol/stack_push.hpp | 4 +- include/sol/table_core.hpp | 31 +- include/sol/traits.hpp | 126 ++-- include/sol/types.hpp | 298 ++++----- include/sol/version.hpp | 68 +++ single/include/sol/forward.hpp | 41 +- single/include/sol/sol.hpp | 570 ++++++++++-------- .../lua_version.cpp} | 4 +- .../source/{compatibility => }/version.cpp | 52 +- 20 files changed, 721 insertions(+), 606 deletions(-) rename include/sol/compatibility/{version.hpp => lua_version.hpp} (95%) delete mode 100644 include/sol/config_setup.hpp create mode 100644 include/sol/version.hpp rename tests/compile_tests/source/{config_setup.cpp => compatibility/lua_version.cpp} (93%) rename tests/compile_tests/source/{compatibility => }/version.cpp (93%) diff --git a/cmake/Modules/FindLuaBuild/LuaVanilla.cmake b/cmake/Modules/FindLuaBuild/LuaVanilla.cmake index 3cd7ece8..b938b883 100644 --- a/cmake/Modules/FindLuaBuild/LuaVanilla.cmake +++ b/cmake/Modules/FindLuaBuild/LuaVanilla.cmake @@ -35,18 +35,12 @@ include(Common/Core) set(LUA_VANILLA_5.1_LATEST_VERSION 5.1.5) set(LUA_VANILLA_5.2_LATEST_VERSION 5.2.4) set(LUA_VANILLA_5.3_LATEST_VERSION 5.3.5) -set(LUA_VANILLA_5.4_LATEST_VERSION 5.4.0-beta) +set(LUA_VANILLA_5.4_LATEST_VERSION 5.4.0) # exact version, coming from CI: pull directly from Lua and use external project to build # list of known md5 / sha1: must update when there are changes -set(LUA_VANILLA_MD5_5.4.0-beta 961e2692a10a4a3c6fe80086e4cbefd5) -set(LUA_VANILLA_SHA1_5.4.0-beta 5d018de9b1f69b7e334dc3fa43b815669e103880) -set(LUA_VANILLA_MD5_5.4.0-alpha d49d30b394794b96ffad53513ac647a5) -set(LUA_VANILLA_SHA1_5.4.0-alpha cf3559dc43cad35463740c6fbedeb1ea501e5e23) -set(LUA_VANILLA_MD5_5.4.0-work2 3cdf2a4eb84dde6b6aaf5d2d1de07be9) -set(LUA_VANILLA_SHA1_5.4.0-work2 e8484e61c5c338e3ec2f75dbe0f6703d079fecf9) -set(LUA_VANILLA_MD5_5.4.0-work1 0ff232b8658884155a43cf72212edbd9) -set(LUA_VANILLA_SHA1_5.4.0-work1 a8193b14ed3869917d1102cb0418cf9dfb0d9baf) +set(LUA_VANILLA_MD5_5.4.0 dbf155764e5d433fc55ae80ea7060b60) +set(LUA_VANILLA_SHA1_5.4.0 8cdbffa8a214a23d190d7c45f38c19518ae62e89) set(LUA_VANILLA_MD5_5.3.5 4f4b4f323fd3514a68e0ab3da8ce3455) set(LUA_VANILLA_SHA1_5.3.5 112eb10ff04d1b4c9898e121d6bdf54a81482447) set(LUA_VANILLA_MD5_5.3.4 53a9c68bcc0eda58bdc2095ad5cdfc63) diff --git a/include/sol/compatibility.hpp b/include/sol/compatibility.hpp index bd1c0607..d5175c5d 100644 --- a/include/sol/compatibility.hpp +++ b/include/sol/compatibility.hpp @@ -1,4 +1,4 @@ -// sol3 +// sol3 // The MIT License (MIT) @@ -30,7 +30,8 @@ // though the core abstractions remain the same #include "feature_test.hpp" -#include "compatibility/version.hpp" +#include "compatibility/lua_version.hpp" +#include "version.hpp" #if !defined(SOL_NO_COMPAT) || !(SOL_NO_COMPAT) diff --git a/include/sol/compatibility/version.hpp b/include/sol/compatibility/lua_version.hpp similarity index 95% rename from include/sol/compatibility/version.hpp rename to include/sol/compatibility/lua_version.hpp index 05e840d0..f9052057 100644 --- a/include/sol/compatibility/version.hpp +++ b/include/sol/compatibility/lua_version.hpp @@ -1,4 +1,4 @@ -// sol3 +// sol3 // The MIT License (MIT) @@ -21,11 +21,13 @@ // IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#ifndef SOL_VERSION_HPP -#define SOL_VERSION_HPP +#ifndef SOL_COMPATIBILITY_VERSION_HPP +#define SOL_COMPATIBILITY_VERSION_HPP #include "../feature_test.hpp" +// clang-format off + #if defined(SOL_USING_CXX_LUA) && SOL_USING_CXX_LUA #include #include @@ -95,4 +97,6 @@ #define SOL_LUA_VERSION 503 #endif // Lua Version 503, 502, 501 || luajit, 500 -#endif // SOL_VERSION_HPP +// clang-format on + +#endif // SOL_COMPATIBILITY_VERSION_HPP diff --git a/include/sol/config_setup.hpp b/include/sol/config_setup.hpp deleted file mode 100644 index 33ea2d29..00000000 --- a/include/sol/config_setup.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// sol3 - -// The MIT License (MIT) - -// Copyright (c) 2013-2019 Rapptz, ThePhD and contributors - -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef SOL_CONFIG_SETUP_HPP -#define SOL_CONFIG_SETUP_HPP - - - -#endif // SOL_CONFIG_SETUP_HPP diff --git a/include/sol/feature_test.hpp b/include/sol/feature_test.hpp index 0f72549f..821246ec 100644 --- a/include/sol/feature_test.hpp +++ b/include/sol/feature_test.hpp @@ -49,6 +49,6 @@ #endif // Clang screws up variant #include -#include "config_setup.hpp" +#include "version.hpp" #endif // SOL_FEATURE_TEST_HPP diff --git a/include/sol/lua_value.hpp b/include/sol/lua_value.hpp index 17397302..ad18bf32 100644 --- a/include/sol/lua_value.hpp +++ b/include/sol/lua_value.hpp @@ -34,7 +34,8 @@ namespace sol { struct arr : detail::ebco> { private: using base_t = detail::ebco>; - public: + + public: using base_t::base_t; }; @@ -45,9 +46,13 @@ namespace sol { template using is_lua_value_single_constructible = meta::any, is_reference_or_lua_value_init_list>; - + static lua_State*& thread_local_lua_state() { +#if SOL_ON(SOL_USE_THREAD_LOCAL_) static thread_local lua_State* L = nullptr; +#else + static lua_State* L = nullptr; +#endif return L; } @@ -151,7 +156,7 @@ namespace sol { return lua_value(L, stack::get(L, index, tracking)); } }; - } + } // namespace stack } // namespace sol #endif // SOL_LUA_VALUE_HPP diff --git a/include/sol/resolve.hpp b/include/sol/resolve.hpp index 036f00c6..71bb4889 100644 --- a/include/sol/resolve.hpp +++ b/include/sol/resolve.hpp @@ -1,4 +1,4 @@ -// sol3 +// sol3 // The MIT License (MIT) @@ -33,7 +33,7 @@ namespace sol { // constexpr is fine for not-clang namespace detail { - template (Args...)>> + template , Args...>> inline constexpr auto resolve_i(types, F &&) -> R (meta::unqualified_t::*)(Args...) { using Sig = R(Args...); typedef meta::unqualified_t Fu; @@ -42,22 +42,22 @@ namespace sol { template > inline constexpr auto resolve_f(std::true_type, F&& f) - -> decltype(resolve_i(types>(), std::forward(f))) { + -> decltype(resolve_i(types>(), std::forward(f))) { return resolve_i(types>(), std::forward(f)); } template inline constexpr void resolve_f(std::false_type, F&&) { - static_assert(meta::has_deducible_signature::value, - "Cannot use no-template-parameter call with an overloaded functor: specify the signature"); + static_assert( + meta::has_deducible_signature::value, "Cannot use no-template-parameter call with an overloaded functor: specify the signature"); } template > inline constexpr auto resolve_i(types<>, F&& f) -> decltype(resolve_f(meta::has_deducible_signature(), std::forward(f))) { - return resolve_f(meta::has_deducible_signature{}, std::forward(f)); + return resolve_f(meta::has_deducible_signature {}, std::forward(f)); } - template > + template > inline constexpr auto resolve_i(types, F&& f) -> decltype(resolve_i(types(), std::forward(f))) { return resolve_i(types(), std::forward(f)); } @@ -103,7 +103,7 @@ namespace sol { // so don't use the constexpr versions inside of clang. namespace detail { - template (Args...)>> + template , Args...>> inline auto resolve_i(types, F &&) -> R (meta::unqualified_t::*)(Args...) { using Sig = R(Args...); typedef meta::unqualified_t Fu; @@ -112,22 +112,22 @@ namespace sol { template > inline auto resolve_f(std::true_type, F&& f) - -> decltype(resolve_i(types>(), std::forward(f))) { + -> decltype(resolve_i(types>(), std::forward(f))) { return resolve_i(types>(), std::forward(f)); } template inline void resolve_f(std::false_type, F&&) { - static_assert(meta::has_deducible_signature::value, - "Cannot use no-template-parameter call with an overloaded functor: specify the signature"); + static_assert( + meta::has_deducible_signature::value, "Cannot use no-template-parameter call with an overloaded functor: specify the signature"); } template > inline auto resolve_i(types<>, F&& f) -> decltype(resolve_f(meta::has_deducible_signature(), std::forward(f))) { - return resolve_f(meta::has_deducible_signature{}, std::forward(f)); + return resolve_f(meta::has_deducible_signature {}, std::forward(f)); } - template > + template > inline auto resolve_i(types, F&& f) -> decltype(resolve_i(types(), std::forward(f))) { return resolve_i(types(), std::forward(f)); } diff --git a/include/sol/stack_check_get_unqualified.hpp b/include/sol/stack_check_get_unqualified.hpp index 6756357e..51be9d2f 100644 --- a/include/sol/stack_check_get_unqualified.hpp +++ b/include/sol/stack_check_get_unqualified.hpp @@ -32,9 +32,10 @@ #include #include #include -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT +#if SOL_ON(SOL_STD_VARIANT_) #include -#endif // variant +#endif // variant shenanigans (thanks, Mac OSX) + namespace sol { namespace stack { template @@ -129,7 +130,7 @@ namespace sol { namespace stack { } }; -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT +#if SOL_ON(SOL_STD_VARIANT_) template struct unqualified_check_getter, C> { typedef std::variant V; @@ -170,7 +171,7 @@ namespace sol { namespace stack { return get_one(std::integral_constant(), L, index, std::forward(handler), tracking); } }; -#endif // SOL_STD_VARIANT +#endif // standard variant }} // namespace sol::stack #endif // SOL_STACK_CHECK_UNQUALIFIED_GET_HPP diff --git a/include/sol/stack_check_unqualified.hpp b/include/sol/stack_check_unqualified.hpp index 8bfe0908..435fef59 100644 --- a/include/sol/stack_check_unqualified.hpp +++ b/include/sol/stack_check_unqualified.hpp @@ -32,9 +32,9 @@ #include #include #include -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT +#if SOL_ON(SOL_STD_VARIANT_) #include -#endif // SOL_STD_VARIANT +#endif // variant shenanigans namespace sol { namespace stack { namespace stack_detail { @@ -463,7 +463,7 @@ namespace sol { namespace stack { }; template - struct unqualified_checker, type::userdata> : unqualified_checker> {}; + struct unqualified_checker, type::userdata> : unqualified_checker> { }; template struct unqualified_checker, type::userdata> { @@ -567,7 +567,7 @@ namespace sol { namespace stack { } }; -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT +#if SOL_ON(SOL_STD_VARIANT_) template struct unqualified_checker, type::poly> { @@ -604,7 +604,7 @@ namespace sol { namespace stack { } }; -#endif // SOL_STD_VARIANT +#endif // variant shenanigans }} // namespace sol::stack diff --git a/include/sol/stack_get_unqualified.hpp b/include/sol/stack_get_unqualified.hpp index 5f1b83ca..041ac0b8 100644 --- a/include/sol/stack_get_unqualified.hpp +++ b/include/sol/stack_get_unqualified.hpp @@ -37,7 +37,7 @@ #include #include #include -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT +#if SOL_ON(SOL_STD_VARIANT_) #include #endif // Apple clang screwed up @@ -986,7 +986,8 @@ namespace sol { namespace stack { } }; -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT +#if SOL_ON(SOL_STD_VARIANT_) + template struct unqualified_getter> { using V = std::variant; @@ -1020,7 +1021,7 @@ namespace sol { namespace stack { return get_one(std::integral_constant(), L, index, tracking); } }; -#endif // SOL_STD_VARIANT +#endif // variant }} // namespace sol::stack diff --git a/include/sol/stack_guard.hpp b/include/sol/stack_guard.hpp index dca39301..da0fd173 100644 --- a/include/sol/stack_guard.hpp +++ b/include/sol/stack_guard.hpp @@ -1,4 +1,4 @@ -// sol3 +// sol3 // The MIT License (MIT) @@ -24,7 +24,7 @@ #ifndef SOL_STACK_GUARD_HPP #define SOL_STACK_GUARD_HPP -#include "compatibility/version.hpp" +#include "compatibility/lua_version.hpp" #include "error.hpp" #include @@ -46,11 +46,9 @@ namespace sol { int top; std::function on_mismatch; - stack_guard(lua_State* L) - : stack_guard(L, lua_gettop(L)) { + stack_guard(lua_State* L) : stack_guard(L, lua_gettop(L)) { } - stack_guard(lua_State* L, int top, std::function fx = detail::stack_fail) - : L(L), top(top), on_mismatch(std::move(fx)) { + stack_guard(lua_State* L, int top, std::function fx = detail::stack_fail) : L(L), top(top), on_mismatch(std::move(fx)) { } bool check_stack(int modification = 0) const { int bottom = lua_gettop(L) + modification; diff --git a/include/sol/stack_push.hpp b/include/sol/stack_push.hpp index afb99859..9c907072 100644 --- a/include/sol/stack_push.hpp +++ b/include/sol/stack_push.hpp @@ -37,7 +37,7 @@ #include #include #include -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT +#if SOL_ON(SOL_STD_VARIANT_) #include #endif // Can use variant @@ -1189,7 +1189,7 @@ namespace sol { namespace stack { } }; -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT +#if SOL_ON(SOL_STD_VARIANT_) namespace stack_detail { struct push_function { diff --git a/include/sol/table_core.hpp b/include/sol/table_core.hpp index 3ece96f2..5ee6b238 100644 --- a/include/sol/table_core.hpp +++ b/include/sol/table_core.hpp @@ -116,16 +116,15 @@ namespace sol { template void tuple_set(std::index_sequence, Pairs&& pairs) { - constexpr static bool global = top_level && (meta::count_even_for_pack_v(std::forward(pairs)))>...> > 0); + constexpr static bool global = top_level + && (meta::count_even_for_pack_v(std::forward(pairs)))>...> > 0); auto pp = stack::push_pop(*this); int table_index = pp.index_of(*this); lua_State* L = base_t::lua_state(); (void)table_index; (void)L; - void(detail::swallow{ (stack::set_field<(top_level), raw>(L, - std::get(std::forward(pairs)), - std::get(std::forward(pairs)), - table_index), + void(detail::swallow { (stack::set_field<(top_level), raw>( + L, std::get(std::forward(pairs)), std::get(std::forward(pairs)), table_index), 0)... }); } @@ -224,7 +223,8 @@ namespace sol { using KeyU = meta::unqualified_t; if constexpr (std::is_same_v) { (void)key; - traverse_set_deep(mode | detail::insert_mode::update_if_empty)>(table_index, std::forward(keys)...); + traverse_set_deep(mode | detail::insert_mode::update_if_empty)>( + table_index, std::forward(keys)...); } else if constexpr (std::is_same_v) { (void)key; @@ -319,7 +319,7 @@ namespace sol { #if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES auto pp = stack::push_pop(*this); int table_index = pp.index_of(*this); - constructor_handler handler{}; + constructor_handler handler {}; stack::check(lua_state(), table_index, handler); #endif // Safety } @@ -330,7 +330,7 @@ namespace sol { } basic_table_core(lua_State* L, int index = -1) : basic_table_core(detail::no_safety, L, index) { #if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES - constructor_handler handler{}; + constructor_handler handler {}; stack::check(L, index, handler); #endif // Safety } @@ -338,7 +338,7 @@ namespace sol { #if defined(SOL_SAFE_REFERENCES) && SOL_SAFE_REFERENCES auto pp = stack::push_pop(*this); int table_index = pp.index_of(*this); - constructor_handler handler{}; + constructor_handler handler {}; stack::check(lua_state(), table_index, handler); #endif // Safety } @@ -350,7 +350,7 @@ namespace sol { if (!is_table>::value) { auto pp = stack::push_pop(*this); int table_index = pp.index_of(*this); - constructor_handler handler{}; + constructor_handler handler {}; stack::check(lua_state(), table_index, handler); } #endif // Safety @@ -377,7 +377,7 @@ namespace sol { return end(); } - void clear () { + void clear() { auto pp = stack::push_pop(*this); int table_index = pp.index_of(*this); stack::clear(lua_state(), table_index); @@ -423,7 +423,8 @@ namespace sol { template basic_table_core& traverse_set(Keys&&... keys) { static_assert(sizeof...(Keys) > 1, "must pass at least 1 key and 1 value to set"); - constexpr static bool global = top_level && (meta::count_when_for_to_pack_v...> > 0); + constexpr static bool global + = top_level && (meta::count_when_for_to_pack_v...> > 0); auto pp = stack::push_pop(*this); int table_index = pp.index_of(*this); lua_State* L = base_t::lua_state(); @@ -434,7 +435,7 @@ namespace sol { template basic_table_core& set(Args&&... args) { - if constexpr(sizeof...(Args) == 2) { + if constexpr (sizeof...(Args) == 2) { traverse_set(std::forward(args)...); } else { @@ -608,12 +609,12 @@ namespace sol { auto pp = stack::push_pop(*this); int table_index = pp.index_of(*this); lua_State* L = base_t::lua_state(); - (void)detail::swallow{ 0, (stack::set_ref(L, std::forward(args), table_index), 0)... }; + (void)detail::swallow { 0, (stack::set_ref(L, std::forward(args), table_index), 0)... }; return *this; } private: - template > + template > void set_fx(types, Key&& key, Fx&& fx) { set_resolved_function(std::forward(key), std::forward(fx)); } diff --git a/include/sol/traits.hpp b/include/sol/traits.hpp index 9903ab45..476e3d9e 100644 --- a/include/sol/traits.hpp +++ b/include/sol/traits.hpp @@ -37,7 +37,7 @@ #include #include #include -#if defined(SOL_STD_VARIANT) && SOL_STD_VARIANT != 0 +#if SOL_ON(SOL_STD_VARIANT_) #include #endif // variant is weird on XCode, thanks XCode @@ -57,7 +57,7 @@ namespace sol { namespace meta { using unwrapped_t = typename unwrapped::type; template - struct unwrap_unqualified : unwrapped> {}; + struct unwrap_unqualified : unwrapped> { }; template using unwrap_unqualified_t = typename unwrap_unqualified::type; @@ -79,16 +79,16 @@ namespace sol { namespace meta { using remove_member_pointer_t = remove_member_pointer; template - struct all_same : std::true_type {}; + struct all_same : std::true_type { }; template - struct all_same : std::integral_constant::value && all_same::value> {}; + struct all_same : std::integral_constant::value && all_same::value> { }; template - struct any_same : std::false_type {}; + struct any_same : std::false_type { }; template - struct any_same : std::integral_constant::value || any_same::value> {}; + struct any_same : std::integral_constant::value || any_same::value> { }; template constexpr inline bool any_same_v = any_same::value; @@ -106,16 +106,16 @@ namespace sol { namespace meta { constexpr inline bool neg_v = neg::value; template - struct all : boolean {}; + struct all : boolean { }; template - struct all : std::conditional_t, boolean> {}; + struct all : std::conditional_t, boolean> { }; template - struct any : boolean {}; + struct any : boolean { }; template - struct any : std::conditional_t, any> {}; + struct any : std::conditional_t, any> { }; template constexpr inline bool all_v = all::value; @@ -143,37 +143,37 @@ namespace sol { namespace meta { using disable_any = std::enable_if_t>::value, enable_t>; template - struct find_in_pack_v : boolean {}; + struct find_in_pack_v : boolean { }; template - struct find_in_pack_v : any, find_in_pack_v> {}; + struct find_in_pack_v : any, find_in_pack_v> { }; namespace meta_detail { template - struct index_in_pack : std::integral_constant {}; + struct index_in_pack : std::integral_constant { }; template struct index_in_pack - : conditional_t::value, std::integral_constant, index_in_pack> {}; + : conditional_t::value, std::integral_constant, index_in_pack> { }; } // namespace meta_detail template - struct index_in_pack : meta_detail::index_in_pack<0, T, Args...> {}; + struct index_in_pack : meta_detail::index_in_pack<0, T, Args...> { }; template - struct index_in : meta_detail::index_in_pack<0, T, List> {}; + struct index_in : meta_detail::index_in_pack<0, T, List> { }; template - struct index_in> : meta_detail::index_in_pack<0, T, Args...> {}; + struct index_in> : meta_detail::index_in_pack<0, T, Args...> { }; template - struct at_in_pack {}; + struct at_in_pack { }; template using at_in_pack_t = typename at_in_pack::type; template - struct at_in_pack : std::conditional> {}; + struct at_in_pack : std::conditional> { }; template struct at_in_pack<0, Arg, Args...> { @@ -191,17 +191,17 @@ namespace sol { namespace meta { using on_always = std::true_type; template