From c467671ae8b6ec161c17e86f3383fd0625f755b8 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Fri, 19 Aug 2022 19:48:10 -0400 Subject: remove sol2 (will re-add as submodule) --- lib/sol2/include/sol/policies.hpp | 100 -------------------------------------- 1 file changed, 100 deletions(-) delete mode 100644 lib/sol2/include/sol/policies.hpp (limited to 'lib/sol2/include/sol/policies.hpp') diff --git a/lib/sol2/include/sol/policies.hpp b/lib/sol2/include/sol/policies.hpp deleted file mode 100644 index 7b8d738..0000000 --- a/lib/sol2/include/sol/policies.hpp +++ /dev/null @@ -1,100 +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_FILTERS_HPP -#define SOL_FILTERS_HPP - -#include "traits.hpp" - -#include - -namespace sol { - namespace detail { - struct policy_base_tag {}; - } // namespace detail - - template - struct static_stack_dependencies : detail::policy_base_tag {}; - typedef static_stack_dependencies<-1, 1> self_dependency; - template - struct returns_self_with : detail::policy_base_tag {}; - typedef returns_self_with<> returns_self; - - struct stack_dependencies : detail::policy_base_tag { - int target; - std::array stack_indices; - std::size_t len; - - template - stack_dependencies(int stack_target, Args&&... args) - : target(stack_target), stack_indices(), len(sizeof...(Args)) { - std::size_t i = 0; - (void)detail::swallow{int(), (stack_indices[i++] = static_cast(std::forward(args)), int())...}; - } - - int& operator[](std::size_t i) { - return stack_indices[i]; - } - - const int& operator[](std::size_t i) const { - return stack_indices[i]; - } - - std::size_t size() const { - return len; - } - }; - - template - struct policy_wrapper { - typedef std::index_sequence_for indices; - - F value; - std::tuple policies; - - template , policy_wrapper>>> = meta::enabler> - policy_wrapper(Fx&& fx, Args&&... args) - : value(std::forward(fx)), policies(std::forward(args)...) { - } - - policy_wrapper(const policy_wrapper&) = default; - policy_wrapper& operator=(const policy_wrapper&) = default; - policy_wrapper(policy_wrapper&&) = default; - policy_wrapper& operator=(policy_wrapper&&) = default; - }; - - template - auto policies(F&& f, Args&&... args) { - return policy_wrapper, std::decay_t...>(std::forward(f), std::forward(args)...); - } - - namespace detail { - template - using is_policy = meta::is_specialization_of; - - template - inline constexpr bool is_policy_v = is_policy::value; - } -} // namespace sol - -#endif // SOL_FILTERS_HPP -- cgit v1.2.3