C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Fwd: destructurable std::integer_sequence

From: zys <dou1984_at_[hidden]>
Date: Sat, 4 Jan 2025 10:14:21 +0800 (CST)
make_index_sequence is a fool idea, I used to use i++ with floder expression. Unfortunately, compiler does not support template parameters. Example:


template<class Tup, class... Args>
void forword_pack(Tup&&tup, Args&&... args)
{
int i =0;
((std::get<i++> = args),...); // compile error
}

Received on 2025-01-04 02:14:28