[c++ korea] effective modern c++ study item 2 understanding auto type deduction +손건
TRANSCRIPT
![Page 1: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/1.jpg)
Effective Modern C++ StudyC++ Korea
![Page 2: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/2.jpg)
![Page 3: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/3.jpg)
Effective Modern C++ StudyC++ Korea3
![Page 4: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/4.jpg)
![Page 5: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/5.jpg)
Effective Modern C++ StudyC++ Korea5
![Page 6: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/6.jpg)
Effective Modern C++ StudyC++ Korea6
auto templatedirect mapping
type deducing type deducing
![Page 7: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/7.jpg)
Effective Modern C++ StudyC++ Korea7
template : expr을이용해 ParamType과 T를타입추론한다.
auto : auto가템플릿에서 T의역할을 , 형식지정자(type specifier)가ParamType의역할을한다.같은방식으로 타입추론한다.
auto param = expr;
![Page 8: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/8.jpg)
Effective Modern C++ StudyC++ Korea8
conceptional templatetemplate<typename T>
void func_for_x(T param);
func_for_x(27);
template<typename T>
void func_for_cx(const T param);
func_for_cx(27);
template<typename T>
void func_for_rx(const T& param);
func_for_rx(27);
auto로변수 선언auto x = 27;
const auto cx = x;
const auto & rx = x;
![Page 9: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/9.jpg)
Effective Modern C++ StudyC++ Korea9
conceptional templatetemplate<typename T>
void func_for_x(T param);
func_for_x(27);
auto로변수 선언auto x = 27;
컴파일러가하는 일auto로변수를선언 -> 각각맞는템플릿을호출 ->
템플릿타입추론 -> 추론한 형식에맞는 initializing expression 호출
![Page 10: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/10.jpg)
Effective Modern C++ StudyC++ Korea10
![Page 11: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/11.jpg)
Effective Modern C++ StudyC++ Korea11
![Page 12: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/12.jpg)
Effective Modern C++ StudyC++ Korea12
![Page 13: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/13.jpg)
Effective Modern C++ StudyC++ Korea13
![Page 14: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/14.jpg)
Effective Modern C++ StudyC++ Korea14
![Page 15: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/15.jpg)
Effective Modern C++ StudyC++ Korea15
![Page 16: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/16.jpg)
Effective Modern C++ StudyC++ Korea16
![Page 17: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/17.jpg)
Effective Modern C++ StudyC++ Korea17
![Page 18: [C++ korea] effective modern c++ study item 2 understanding auto type deduction +손건](https://reader033.vdocuments.pub/reader033/viewer/2022042716/55c48cd8bb61eb603c8b46a0/html5/thumbnails/18.jpg)
Effective Modern C++ StudyC++ Korea18