From dc2493e7525bb7633f697ef10f72b72b46222249 Mon Sep 17 00:00:00 2001 From: Andy Belle-Isle Date: Fri, 30 Aug 2019 00:45:36 -0400 Subject: Forget what I said, I just need to change git attributes to mark for vendor --- deps/sol2/include/sol/wrapper.hpp | 307 -------------------------------------- 1 file changed, 307 deletions(-) delete mode 100644 deps/sol2/include/sol/wrapper.hpp (limited to 'deps/sol2/include/sol/wrapper.hpp') diff --git a/deps/sol2/include/sol/wrapper.hpp b/deps/sol2/include/sol/wrapper.hpp deleted file mode 100644 index 75670f0..0000000 --- a/deps/sol2/include/sol/wrapper.hpp +++ /dev/null @@ -1,307 +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_WRAPPER_HPP -#define SOL_WRAPPER_HPP - -#include "types.hpp" - -namespace sol { - - namespace detail { - template - using array_return_type = meta::conditional_t::value, std::add_lvalue_reference_t, T>; - } - - template - struct wrapper { - typedef lua_bind_traits> traits_type; - typedef typename traits_type::args_list args_list; - typedef typename traits_type::args_list free_args_list; - typedef typename traits_type::returns_list returns_list; - - template - static decltype(auto) call(F& f, Args&&... args) { - return f(std::forward(args)...); - } - - struct caller { - template - decltype(auto) operator()(F& fx, Args&&... args) const { - return call(fx, std::forward(args)...); - } - }; - }; - - template - struct wrapper>>::value>> { - typedef lua_bind_traits>> traits_type; - typedef typename traits_type::args_list args_list; - typedef typename traits_type::args_list free_args_list; - typedef typename traits_type::returns_list returns_list; - - template - static decltype(auto) invoke(Args&&... args) { - return fx(std::forward(args)...); - } - - template - static decltype(auto) call(F& fx, Args&&... args) { - return fx(std::forward(args)...); - } - - struct caller { - template - decltype(auto) operator()(F& fx, Args&&... args) const { - return call(fx, std::forward(args)...); - } - }; - - template - struct invoker { - template - decltype(auto) operator()(Args&&... args) const { - return invoke(std::forward(args)...); - } - }; - }; - - template - struct wrapper>::value>> { - typedef lua_bind_traits> traits_type; - typedef typename traits_type::object_type object_type; - typedef typename traits_type::return_type return_type; - typedef typename traits_type::args_list args_list; - typedef types free_args_list; - typedef typename traits_type::returns_list returns_list; - - template - static auto call(object_type& mem) -> detail::array_return_type { - return mem.*fx; - } - - template - static decltype(auto) invoke(object_type& mem, Arg&& arg, Args&&...) { - return mem.*fx = std::forward(arg); - } - - template - static auto call(Fx&& fx, object_type& mem) -> detail::array_return_type { - return mem.*fx; - } - - template - static void call(Fx&& fx, object_type& mem, Arg&& arg, Args&&...) { - using actual_type = meta::unqualified_t>; - if constexpr (std::is_array_v) { - using std::cend; - using std::cbegin; - auto first = cbegin(arg); - auto last = cend(arg); - for (std::size_t i = 0; first != last; ++i, ++first) { - (mem.*fx)[i] = *first; - } - } - else { - (mem.*fx) = std::forward(arg); - } - } - - struct caller { - template - decltype(auto) operator()(Fx&& fx, object_type& mem, Args&&... args) const { - return call(std::forward(fx), mem, std::forward(args)...); - } - }; - - template - struct invoker { - template - decltype(auto) operator()(Args&&... args) const { - return invoke(std::forward(args)...); - } - }; - }; - - template - struct member_function_wrapper { - typedef O object_type; - typedef lua_bind_traits traits_type; - typedef typename traits_type::args_list args_list; - typedef types free_args_list; - typedef meta::tuple_types returns_list; - - template - static R invoke(O& mem, Args&&... args) { - return (mem.*fx)(std::forward(args)...); - } - - template - static R call(Fx&& fx, O& mem, Args&&... args) { - return (mem.*fx)(std::forward(args)...); - } - - struct caller { - template - decltype(auto) operator()(Fx&& fx, O& mem, Args&&... args) const { - return call(std::forward(fx), mem, std::forward(args)...); - } - }; - - template - struct invoker { - template - decltype(auto) operator()(O& mem, Args&&... args) const { - return invoke(mem, std::forward(args)...); - } - }; - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - -#if defined(SOL_NOEXCEPT_FUNCTION_TYPE) && SOL_NOEXCEPT_FUNCTION_TYPE - //noexcept has become a part of a function's type - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - - template - struct wrapper : public member_function_wrapper { - }; - -#endif // noexcept is part of a function's type - -} // namespace sol - -#endif // SOL_WRAPPER_HPP -- cgit v1.2.3