int x = 1;
decltype(x) y = x;
xxxxxxxxxx
int i;
float f;
double d;
typedef decltype(i + f) type1; // float
typedef decltype(f + d) type2; // double
typedef decltype(f < d) type3; // bool
xxxxxxxxxx
template<typename T, typename U>
auto Add(T t, U u) -> decltype(t + u) {
return t + u;
}