난 정말 최고야 멋있어
[C++] auto 와 decltype(auto)의 차이 본문
http://www.cplusplus.com/forum/general/188645/
auto -> 일반 auto는 레퍼런스같은걸 고려안하고 무조건 lvalue로 리턴
auto& -> 항상 레퍼런스로 연역
decltype(auto) -> 주어지는 값에 따라 알아서 판별 (레퍼런스를 넘기면 레퍼런스로 취급, lvalue를 넘기면 lvalue로 취급)
http://www.cplusplus.com/forum/general/188645/
auto -> 일반 auto는 레퍼런스같은걸 고려안하고 무조건 lvalue로 리턴
auto& -> 항상 레퍼런스로 연역
decltype(auto) -> 주어지는 값에 따라 알아서 판별 (레퍼런스를 넘기면 레퍼런스로 취급, lvalue를 넘기면 lvalue로 취급)