Open2020/11/22にコメント追加1auto parameter pack...C++yohhoy2020/11/22に更新https://twitter.com/yohhoy/status/1109089585240236034 template <auto... Ns> constexpr auto f(auto... xs) { auto lm = [...xs1=xs](auto... xs2) { return (xs1 + ...) + (xs2 + ...); }; return lm(Ns...); } static_assert( f<1, 2>(3, 4) == 10 );
yohhoy2020/11/22に更新https://twitter.com/yohhoy/status/1109089585240236034 template <auto... Ns> constexpr auto f(auto... xs) { auto lm = [...xs1=xs](auto... xs2) { return (xs1 + ...) + (xs2 + ...); }; return lm(Ns...); } static_assert( f<1, 2>(3, 4) == 10 );