std::decay_t<decltype(true ? T1() : T2())>>
RT max(T1 a, T2 b)
{
return b < a ? a : b;
}
what does std::decay_t do ? I googled it but why one should use it ?
why it isn't std::decay_t<decltype(true ? T1 : T2)> ?
https://en.cppreference.com/w/cpp/types/decay
basically it returns the same type without & or const, and converts arrays like [] into *
Обсуждают сегодня