The `auto` keyword was repurposed in C++11 for a deduced type


Decltype is a C++11 keyword that can be used to find the type of an expression.


Quality Example
More concise

"In the cases where auto can be used it is more concise than decltype as you don t need to provide the expression from which the type will be inferred"

from question "Decltype vs auto"

Significantly more

"Decltype is significantly more versatile that auto and can always be used in place of it"

from question "When should I use decltype(x) instead of auto to declare the type of a variable?"

Back to Home
Data comes from Stack Exchange with CC-BY-SA-3.0