Last active
August 29, 2015 14:02
-
-
Save lnicola/b4274c9ca9c39386df60 to your computer and use it in GitHub Desktop.
a class for tracing C++ constructors and assignment operators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct trace | |
| { | |
| trace() | |
| { | |
| std::cout << "trace()" << std::endl; | |
| } | |
| trace(const trace &) | |
| { | |
| std::cout << "trace(const trace &)" << std::endl; | |
| } | |
| trace(trace &&) | |
| { | |
| std::cout << "trace(trace &&)" << std::endl; | |
| } | |
| trace & operator=(const trace &) | |
| { | |
| std::cout << "operator=(const trace &)" << std::endl; | |
| return *this; | |
| } | |
| trace & operator=(trace &&) | |
| { | |
| std::cout << "operator=(trace &&)" << std::endl; | |
| return *this; | |
| } | |
| ~trace() | |
| { | |
| std::cout << "~trace()" << std::endl; | |
| } | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment