#include #include #include #include #include "test.hpp" template struct N {}; struct foo; template using sig = int(foo::*)(Ts...) const volatile RREF; int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = replace_args_t<0, f, int, char>; using expect = sig, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = replace_args_t<1, f, int, char>; using expect = sig, int, char, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = replace_args_t<2, f, int, char>; using expect = sig, N<1>, int, char, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = replace_args_t<3, f, int, char>; using expect = sig, N<1>, N<2>, int, char>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = replace_args_t<4, f, int, char, short, void*>; using expect = sig, N<1>, N<2>, N<3>, int, char, short, void*>; CT_ASSERT(std::is_same::value); } }