8.7 Type deduction for objects using the auto keyword

주홍영·2022년 3월 12일
0

Learncpp.com

목록 보기
83/199

https://www.learncpp.com/cpp-tutorial/type-deduction-for-objects-using-the-auto-keyword/

type 추론 할당 키워드인 auto에 대한 설명이다
참고로 auto는 할당할 때 value가 const라면 const는 떼고 타입을 정한다
const를 원하면 const auto를 사용하면 된다

다만 initialize, instantiate 할때 auto를 사용하면
의도치 않은 일이 일어날 수 있으므로 주의해서 사용한다

단어장

deduce : 추론하다
infer : 추론하다
deduction : 추론
inference : 추론

profile
청룡동거주민

0개의 댓글