Tags
- postman tests
- c#
- LSL_Script
- Android/iOS Developer
- 프런트엔드
- Intellij
- Interaction developer
- postman
- emplace_back
- postman excel
- C++
- web developer
- UI/UX Engineer
- postman csv
- postman html parse
- solidity
- postman collection
- oracle
- 다빈치 리졸브
- Front-end developer
- 좋은 개발자
- 우수한 프런트 개발자
- postman pre-request
- postman automations
- Java
- Unity
- postman collection variables
- MFC
- Android
- postman session
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Archives
- Today
- Total
david's daily developer note
[C,C++] Variadic Template 본문
728x90
C++ 11부터 가변인자 템플릿(Variadic Template)이라는 개념이 추가되어 간략하게 메모해본당.
https://msdn.microsoft.com/ko-kr/library/dn439779.aspx
Ellipsis and Variadic Templates
Learn more about: Ellipsis and Variadic Templates
docs.microsoft.com
개념은 개념이고,, 그래서 좋은 것 뭐있나 찾아보니..
C++ 11부터 STL 컨테이너가 가변인자 템플릿를 활용하여 성능적으로 유리해졌다는 것인데,
void emplace_back( Args&&... args );
상기 함수 원형을 활용할 경우, 이동생성자를 호출함으로 할당의 로드가 줄어들어 성능의 이점이 있다는 말!
https://msdn.microsoft.com/ko-kr/library/dd293665.aspx
How to: Define move constructors and move assignment operators (C++)
Learn more about: Move Constructors and Move Assignment Operators (C++)
docs.microsoft.com
이동생성자가 속도 때문에 고려되었는데, 가변인자 템플릿과 만나서 좋은 시너지를 만들어 내는군요.
손에 익지않아서 push_back을 먼저 치게되는 것은 함정
728x90
'[Develop] Native > C++ , C' 카테고리의 다른 글
[C,C++] emplace_back (0) | 2018.05.28 |
---|---|
[C,C++] lvalue, rvalue (0) | 2018.05.25 |
[C,C++] 실행파일이 만들어지는 단계 (0) | 2018.05.17 |
[C,C++] 디버깅++ (0) | 2012.03.06 |
[C,C++] C++ Macro vs inline (0) | 2012.03.03 |