#ifndef GEODE_CORE_META_CALLCONV_HPP #define GEODE_CORE_META_CALLCONV_HPP #include "tuple.hpp" #include #include namespace geode::core::meta { /* CRTP class for creating calling conventions for Function and Hook. * Provides some utilities for less verbose filtering of parameters, and * some wrappers to require the custom calling convention to supply an * invoker and a way to get a wrapper for hooks. */ template class CallConv { protected: using MyTuple = Tuple; template class arr_to_seq_impl; template * arr> class arr_to_seq_impl { private: template class getter; template class getter> { public: using result = std::index_sequenceat(indices)...>; }; public: using result = typename getter>::result; }; template using arr_to_seq = typename arr_to_seq_impl<&arr>::result; }; } #endif /* GEODE_CORE_META_CALLCONV_HPP */