일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 영화
- Smart Pointer
- effective stl
- more effective c++
- 오블완
- reference
- UE4
- 언리얼
- 스마트 포인터
- 게임
- implicit conversion
- virtual function
- 보편 참조
- 예외
- lua
- 상속
- operator new
- resource management class
- 영화 리뷰
- 티스토리챌린지
- 참조자
- 암시적 변환
- effective modern c++
- 반복자
- Effective c++
- exception
- std::async
- universal reference
- iterator
- c++
Archives
- Today
- Total
목록2025/04/29 (1)
스토리텔링 개발자
[Effective Modern C++] 41. 항상 복사되는 매개변수는 값 전달도 고려하기
항목 41. 이동이 저렴하고 항상 복사되는 복사 가능 매개변수에 대해서는 값 전달을 고려하라 복사되도록 만들어진 함수 매개변수class Widget{public: // 이 버전은 복사되도록 만들어졌다. void addName(const std::String& newName) // lValue { names.push_back(newName); // 복사 } // 이동 버전 void addName(std::string&& newName) // rValue { names.push_back(std::move(newName)); // 이동 } ... private: std::vector names;};이 경우 본질적으로..
Effective C++/Effective Modern C++
2025. 4. 29. 11:15