All challenges
Code AnalysisIntermediate 60s

void_t detection idiom SFINAE

template<class, class = void> struct has_size : std::false_type {}; template<class T> struct has_size<T, std::void_t<decltype(std::declval<T>().size())>> : std::true_type {}; What does has_size<std::vector<int>>::value evaluate to, and why?

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle