auto和decltype的配合使用 template<typename T, typename U> auto add(T t, U u) -> decltype(t + u) { return t + u; }