C++ Library Extensions 2022.12.09
To help learn modern C++ programming
043-ownership.cpp File Reference
#include <tpf_output.hpp>
Include dependency graph for 043-ownership.cpp:

Go to the source code of this file.

Classes

class  ClsType
 

Functions

void test_rvalue_lvalue_reference ()
 
void understand_the_concept_of_ownership ()
 
void object_life_time_of_const_and_rvalue_ref ()
 
void bomb_lurking_in_your_code (ClsType &obj)
 
void bomb_lurking_in_your_code_rvalue_ref (ClsType &&obj)
 
void you_should_be_extra_careful_when_using_std_move ()
 
void you_should_be_extra_careful_when_using_ref_move ()
 
int main ()
 

Variables

tpf::sstream stream
 
auto endl = tpf::endl
 

Function Documentation

◆ bomb_lurking_in_your_code()

void bomb_lurking_in_your_code ( ClsType obj)

Definition at line 202 of file 043-ownership.cpp.

Here is the caller graph for this function:

◆ bomb_lurking_in_your_code_rvalue_ref()

void bomb_lurking_in_your_code_rvalue_ref ( ClsType &&  obj)

Definition at line 207 of file 043-ownership.cpp.

Here is the caller graph for this function:

◆ main()

int main ( )

Definition at line 241 of file 043-ownership.cpp.

Here is the call graph for this function:

◆ object_life_time_of_const_and_rvalue_ref()

void object_life_time_of_const_and_rvalue_ref ( )

Definition at line 157 of file 043-ownership.cpp.

◆ test_rvalue_lvalue_reference()

void test_rvalue_lvalue_reference ( )

Definition at line 47 of file 043-ownership.cpp.

◆ understand_the_concept_of_ownership()

void understand_the_concept_of_ownership ( )

Definition at line 125 of file 043-ownership.cpp.

◆ you_should_be_extra_careful_when_using_ref_move()

void you_should_be_extra_careful_when_using_ref_move ( )

Definition at line 226 of file 043-ownership.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ you_should_be_extra_careful_when_using_std_move()

void you_should_be_extra_careful_when_using_std_move ( )

Definition at line 213 of file 043-ownership.cpp.

Here is the call graph for this function:

Variable Documentation

◆ endl

auto endl = tpf::endl

Definition at line 4 of file 043-ownership.cpp.

◆ stream

tpf::sstream stream

Definition at line 3 of file 043-ownership.cpp.