728x90
형식언어
항목 4: 연역된 형식을 파악하는 방법을 알아두라
- IDE편집기
마우스 커서를 올려 놓으면 연역을 확인해 준다. - 컴파일러 진단 메시지
원하는 형식에 컴파일러 에러 문제가 발생하게 만드는 것이다.
template<typename T> class TD;
auto x = theAnswer;
auto y = &theAnswer;
TD<decltype(x)> xType;
TD<decltype(y)> yType;
error: aggreate 'TD xType' has incomplete type and cannot be defined.
error: aggreate 'TD<const int *> yType' has incomplete type and cannot be defined.
- 실행시점 출력
728x90
'Language > effective modern C++' 카테고리의 다른 글
Effective modern C++ ( Auto ) (0) | 2021.10.16 |
---|---|
Effective modern C++ ( Auto ) (0) | 2021.10.16 |
Effective modern C++ ( 형식 언어 ) (0) | 2021.09.26 |
Effective modern C++ ( 형식 언어 ) (0) | 2021.09.22 |
Effective modern C++ ( 형식 언어 ) (0) | 2021.09.21 |
댓글