SFINAE with C++14 return type deduction
问题 Thanks to C++14, we'll soon be able to curtail verbose trailing return types; such as the generic min example from David Abrahams 2011 post: template <typename T, typename U> auto min(T x, U y) -> typename std::remove_reference< decltype(x < y ? x : y) >::type { return x < y ? x : y; } Under C++14 the return type can be omitted, and min can be written as: template <typename T, typename U> auto min(T x, U y) { return x < y ? x : y; } This is a simple example, however return type deduction is