What does `struct decay <T, R (A ..., ...)>` mean?
2 answers
int foo(int);
int bar(int, ...);
these are two different functions. foohas type int(int). barhas type int(int,...).
...is C-style varargs so as not to be confused with the arguments of the variational pattern that they also use ....
template <typename T, typename R, typename ...A>
struct decay<T, R(A..., ...)> { using type = R(*)(A..., ...); };
This part of the implementation of the optimized version is std::decayinside boost::hana. Parts typename Tand Tare red herrings, part of this optimization.
This specialization, which corresponds to R(A..., ...), where A...and Rare derived from the signature of the function.
double(int, char, ...) hana::details::decay, R double, A... int, char. ... " C".
, , varargs C-, . double(int, char, ...) double(*)(int, char, ...).
C . .
+7