What is difference between decltype(auto) and decltype(returning expr) as return type?
What is the difference between decltype(auto) and decltype(returning expression) as return type of a function (template) if expr used without parentheses in both cases? auto f() -> decltype(auto) { return expr; } // 1 auto f() -> decltype(expr) { return expr; } // 2 Above f can be defined/declared in any context and can be either (member) function or (member) function template, or even (generic) lambda. expr can depend on any template parameters. In second version both expr are exactly the same expression without extra parentheses. Which differences can one expect, using first or second form