what is the advantage over auto ?
Auto strip away const and reference qualifier
not true, decltype returns the type of the evaluated expression
decltype(auto) can be used for avoid lose & from a return: ie: auto x = something(); //and something is returns int&, x will be int. decltype(auto) y = something(); //and something is return int&, x wil be int&
Обсуждают сегодня