Skip to content

jingedawang/constructor_test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

constructor_test

Show you the discipline of copy and move constructors.

Build

git clone https://github.com/jingedawang/constructor_test.git
cd constructor_test
mkdir build
cd build
cmake ..
make

Usage

./constructor_test

We have tested the code under GCC 5.4.0. It should have the following output:

-------------------------1-------------------------
Constructor
-------------------------2-------------------------
Copy Constructor
-------------------------3-------------------------
Copy Constructor
-------------------------4-------------------------
Copy Assignment operator
-------------------------5-------------------------
Constructor
Move Constructor
-------------------------6-------------------------
Move Constructor
-------------------------7-------------------------
Constructor
Move Constructor
Move Constructor
-------------------------8-------------------------
-------------------------9-------------------------
Constructor
Move Assignment operator

To figure out what these results mean, please see my blog 拷贝构造函数和移动构造函数.

About

Show you the discipline of copy and move constructors.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published