Questions tagged [index-sequence]

17 questions
0
votes
1 answer

Call member function for each element of std::tuple

I've been searching the most simple and elegant solution and found this: #include #include #include struct A{ void hi(){ std::cout << "HI\n"; } }; template void unpack(Tuple&…
toozyfuzzy
  • 1,080
  • 1
  • 9
  • 20
0
votes
0 answers

Need index_sequence in a C++11 library - but want to skip whenever possible

I'm writing this small header-mostly library, which has to support C++11. Unfortunately, it turns out that I need an index_sequence somewhere in there. I can "lift" an implementation from somewhere (e.g. this one, here on SO); but of course I would…
einpoklum
  • 118,144
  • 57
  • 340
  • 684
1
2