rosa/inc/alsk/skeleton/link/utility.h

28 lines
645 B
C
Raw Normal View History

2021-05-10 16:14:24 +00:00
#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