decltype(0xdeedbeef) number = 0; // number is of type int! decltype(someArray[0]) element = someArray[0];