Could you walk me through the exact paragraphs of [temp] that are involved in the logic under which double binds to Pack, while T is deduced to int in the following example?
#include <type_traits>
template <typename... Pack, typename T>
T foo(T arg);
static_assert(std::is_same_v<
decltype(foo<double>(42)),
int
>);
I do intuitively understand why it is the way it is, and not any other (like Pack=[], T=double or the program being ill-formed), yet I didn't manage to find a satisfying explanation in the standard. Never took the time to read the entire thing, so I'm probably just looking at the wrong place.