3

Is it possible to use std::tuple "partly specialized" so that it contains std::pair<fixed_t, T> with varying T?

UPD: the tuple should contain the pairs. So it is equivalent to using an array of fixed_t together with a regular std::tuple.

Alex
  • 1,165
  • 2
  • 9
  • 27

1 Answers1

4

Use variadic tempate alias and parameter pack expansion:

template<typename... Types>
using fixed_tuple = std::tuple< std::pair<fixed_t, Types>... >;

Live example.

Revolver_Ocelot
  • 8,609
  • 3
  • 30
  • 48