https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71886

--- Comment #1 from Tomasz KamiƄski <tomaszkam at gmail dot com> ---
Such code is useful, for example in case of variant<T1, T2, T3> universal
constructor from U&&, where there is a need to determine best candidate among
the function taking parameter each type be value.

This may be implemented using:
template<typename Sig>
struct single_call
{
   Sig operator();
};

template<typename... Sigs>
struct multiple_calls : single_call<Sigs>...
{
  using single_call<Sigs>::operator()...;
};

Then to determine an index of type to be constructed can be done by:
decltype(multiple_calls<std::integer_sequence<Is>(Ts)...>)::value
Where Is is [0,1,2] and Ts is [T0, T1, T2].

Reply via email to