C++11: ‘decltype’

decltype is a new keyword that infers the type of a given expression. Though it can be used instead of auto; it is used mainly on return types. For example; this function: could be written using decltype: The compiler evaluates 'a+b' and infers the type of such expression is 'int' and defines 'ret' as an… Continue reading C++11: ‘decltype’