본문 바로가기

Move Semantics3

[C++] C++11에서 추가된 기능 (1) References The C++ Standard Library Contents nullptr and std::nullptr_t auto Uniform Initialization Range-based Loop Move Semantics and Rvalue References New String Literals Keyword noexcept Keyword constexpr C++11부터 유용하고 새로운 기능들이 추가되었는데, references에서 언급하고 있는 C++11 기능들을 이번 포스팅을 통해서 한 번 정리해보고자 합니다. Spaces in Template Expressions std::vector >; // OK in each C++ version std::vector>; // OK since C.. 2022. 12. 3.
[C++] 클래스(Class) 심화편 (1) References Professional C++ https://en.cppreference.com/w/ Contents friend 객체 동적 할당 이동 생성자, 이동 대입 연산자 우측값 레퍼런스, Move Semantics 구현 std::exchange Rule of Zero [C++] 클래스(Class) 기본편 지난 포스팅에서 클래스와 객체에 대해서 살펴봤습니다. 이번 포스팅에서는 클래스와 객체를 최대한 활용할 수 있는 세부사항들을 완벽히 살펴보도록 하겠습니다. 1. friend C++은 클래스 안에서 다른 클래스나 다른 클래스의 멤버 함수 또는 비멤버(non-member) 함수를 friend로 선언하는 기능을 제공합니다. friend로 지정한 대상은 이 클래스의 protected나 private .. 2022. 2. 11.
[C++] Move Semantics References 씹어먹는 C++ (https://modoocode.com/228) http://thbecker.net/articles/rvalue_references/section_07.html Contents Move Semantics(std::move) 2021.08.11 - [C & C++] - [C++] 우측값 참조(rvalue reference) [C++] 우측값 참조(rvalue reference) References 씹어먹는 C++ (https://modoocode.com/227) http://thbecker.net/articles/rvalue_references/section_07.html Contents 복사 생략(Copy Elision) 좌측값(lvalue)와 우측값(rvalue) .. 2021. 8. 12.