I rarely see decltype(auto)
but when I do it confuses me because it seems to do the same thing as auto
when returning from a function.
auto g() { return expr; }
decltype(auto) g() { return expr; }
What is the difference between these two syntaxes?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…