rosa/inc/alsk/skeleton/link/utility.h
2021-05-10 18:14:24 +02:00

28 lines
645 B
C++

#ifndef ALSK_ALSK_SKELETON_LINK_UTILITY_H
#define ALSK_ALSK_SKELETON_LINK_UTILITY_H
#include "args.h"
namespace alsk {
template<typename> struct AutoLinkSerialImpl;
template<typename R, typename... Args>
struct AutoLinkSerialImpl<R(Args...)> {
template<typename> struct Helper;
template<std::size_t... indices>
struct Helper<std::index_sequence<indices...>> {
using in = R(alsk::arg::P<indices>...);
using out = alsk::arg::R<0>(Args...);
};
using type = Helper<decltype(std::make_index_sequence<sizeof...(Args)>())>;
};
template<typename Signature>
using AutoLinkSerial = typename AutoLinkSerialImpl<Signature>::type;
}
#endif