https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49251
LogicStuff <logicstuffs at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |logicstuffs at gmail dot com --- Comment #6 from LogicStuff <logicstuffs at gmail dot com> --- #include <tuple> template< std::size_t... Indices > struct indices {}; template< class... Args > void sink( Args&&... ) {} template< class Tuple, std::size_t... Indices > void unpack_test( Tuple t, indices<Indices...> ) { sink( std::get<Indices>(t)... ); } int main() { unpack_test( std::tuple<>(), indices<>() ); } ------------------------ With the small change in the signature (notice passing `t` by value), is this warning acceptable? bug.cc: In instantiation of 'void unpack_test(Tuple, indices<Indices ...>) [with Tuple = std::tuple<>; long unsigned int ...Indices = {}]': bug.cc:15:44: required from here bug.cc:10:25: warning: parameter 't' set but not used [-Wunused-but-set-parameter] void unpack_test( Tuple t, indices<Indices...> ) { ^ Observed with various versions from 4.4.7 to 9.0.0 201810. Not observed with Clang.