#include #include #include #include #ifndef CT_ASSERT #define CT_ASSERT(...) static_assert(__VA_ARGS__, #__VA_ARGS__) #endif //CT_ASSERT namespace ct = callable_traits; template struct N {}; template using sig = const char*(&)(Ts...); int main() { { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = ct::pop_back_args_t; using expect = sig<>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>, N<4>>; CT_ASSERT(std::is_same::value); } { using f = sig, N<1>, N<2>, N<3>, N<4>>; using test = ct::pop_back_args_t; using expect = sig, N<1>, N<2>, N<3>>; CT_ASSERT(std::is_same::value); } }