From 9bddce66f82567c04593c2868ca37526ac4a33bb Mon Sep 17 00:00:00 2001 From: ThePhD Date: Wed, 28 Feb 2018 19:20:20 -0500 Subject: [PATCH] Visual C++ introduced a regression in all frontends that were not /std:c++14. Kind of tired, don't want to file the bug.... --- single/sol/sol.hpp | 59 ++++++++++++++------------------------ single/sol/sol_forward.hpp | 4 +-- sol/stack_push.hpp | 30 +++---------------- sol/traits.hpp | 4 +++ sol/types.hpp | 21 ++++++++------ 5 files changed, 44 insertions(+), 74 deletions(-) diff --git a/single/sol/sol.hpp b/single/sol/sol.hpp index 16b49547..2af46e48 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-02-24 23:50:10.791344 UTC -// This header was generated with sol v2.19.4 (revision 22c41d9) +// Generated 2018-03-01 00:19:34.880908 UTC +// This header was generated with sol v2.19.4 (revision b46b106) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_HPP @@ -1641,7 +1641,11 @@ namespace sol { template using is_string_like = any< is_specialization_of>, +#ifdef SOL_CXX17_FEATURES + is_specialization_of>, +#else is_specialization_of>, +#endif meta::all>, meta::any_same>>, char, char16_t, char32_t, wchar_t>> >; @@ -5326,20 +5330,23 @@ namespace sol { template struct is_container> : std::false_type {}; - template - struct is_container> : std::false_type {}; - - template - struct is_container> : std::false_type {}; + template + struct is_container>::value>> : std::false_type {}; template - struct is_container>::value - && !is_initializer_list>::value - && !meta::is_string_like>::value + struct is_container> + , meta::neg>, char, wchar_t, char16_t, char32_t>> + >::value >> : std::true_type {}; template - struct is_container>::value && !meta::any_same>, char, wchar_t, char16_t, char32_t>::value>> : std::true_type {}; + struct is_container> + , meta::neg>> + , meta::neg>> + >::value + >> : std::true_type {}; } // namespace detail template @@ -10451,39 +10458,17 @@ namespace stack { } }; - template - struct pusher> { - static int push(lua_State* L, const std::basic_string& wstr) { + template + struct pusher, std::enable_if_t::value>> { + static int push(lua_State* L, const std::basic_string& wstr) { return push(L, wstr, wstr.size()); } - static int push(lua_State* L, const std::basic_string& wstr, std::size_t sz) { + static int push(lua_State* L, const std::basic_string& wstr, std::size_t sz) { return stack::push(L, wstr.data(), wstr.data() + sz); } }; - template - struct pusher> { - static int push(lua_State* L, const std::basic_string& u16str) { - return push(L, u16str, u16str.size()); - } - - static int push(lua_State* L, const std::basic_string& u16str, std::size_t sz) { - return stack::push(L, u16str.data(), u16str.data() + sz); - } - }; - - template - struct pusher> { - static int push(lua_State* L, const std::basic_string& u32str) { - return push(L, u32str, u32str.size()); - } - - static int push(lua_State* L, const std::basic_string& u32str, std::size_t sz) { - return stack::push(L, u32str.data(), u32str.data() + sz); - } - }; - template struct pusher> { template diff --git a/single/sol/sol_forward.hpp b/single/sol/sol_forward.hpp index d2acb13d..07515ab1 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-02-24 23:50:11.000275 UTC -// This header was generated with sol v2.19.4 (revision 22c41d9) +// Generated 2018-03-01 00:19:35.095051 UTC +// This header was generated with sol v2.19.4 (revision b46b106) // https://github.com/ThePhD/sol2 #ifndef SOL_SINGLE_INCLUDE_FORWARD_HPP diff --git a/sol/stack_push.hpp b/sol/stack_push.hpp index e17d56c9..8d4d16b0 100644 --- a/sol/stack_push.hpp +++ b/sol/stack_push.hpp @@ -903,39 +903,17 @@ namespace stack { } }; - template - struct pusher> { - static int push(lua_State* L, const std::basic_string& wstr) { + template + struct pusher, std::enable_if_t::value>> { + static int push(lua_State* L, const std::basic_string& wstr) { return push(L, wstr, wstr.size()); } - static int push(lua_State* L, const std::basic_string& wstr, std::size_t sz) { + static int push(lua_State* L, const std::basic_string& wstr, std::size_t sz) { return stack::push(L, wstr.data(), wstr.data() + sz); } }; - template - struct pusher> { - static int push(lua_State* L, const std::basic_string& u16str) { - return push(L, u16str, u16str.size()); - } - - static int push(lua_State* L, const std::basic_string& u16str, std::size_t sz) { - return stack::push(L, u16str.data(), u16str.data() + sz); - } - }; - - template - struct pusher> { - static int push(lua_State* L, const std::basic_string& u32str) { - return push(L, u32str, u32str.size()); - } - - static int push(lua_State* L, const std::basic_string& u32str, std::size_t sz) { - return stack::push(L, u32str.data(), u32str.data() + sz); - } - }; - template struct pusher> { template diff --git a/sol/traits.hpp b/sol/traits.hpp index 31c64288..fb0cded8 100644 --- a/sol/traits.hpp +++ b/sol/traits.hpp @@ -555,7 +555,11 @@ namespace sol { template using is_string_like = any< is_specialization_of>, +#ifdef SOL_CXX17_FEATURES + is_specialization_of>, +#else is_specialization_of>, +#endif meta::all>, meta::any_same>>, char, char16_t, char32_t, wchar_t>> >; diff --git a/sol/types.hpp b/sol/types.hpp index 49bafa75..67bff965 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -859,20 +859,23 @@ namespace sol { template struct is_container> : std::false_type {}; - template - struct is_container> : std::false_type {}; - - template - struct is_container> : std::false_type {}; + template + struct is_container>::value>> : std::false_type {}; template - struct is_container>::value - && !is_initializer_list>::value - && !meta::is_string_like>::value + struct is_container> + , meta::neg>, char, wchar_t, char16_t, char32_t>> + >::value >> : std::true_type {}; template - struct is_container>::value && !meta::any_same>, char, wchar_t, char16_t, char32_t>::value>> : std::true_type {}; + struct is_container> + , meta::neg>> + , meta::neg>> + >::value + >> : std::true_type {}; } // namespace detail template