411 REFERENCE · Wikibooks
C++ Language/Type/Shortcuts/FromAnotherVariable
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
If variable iOtherVar has already been defined to have type int, then definition decltype(iOtherVar) iVar = 22; is the same as defining int iVar = 22;.
This decltype() shortcut can even refer to a full expression.
Additional information about decltype (includes interactive examples)