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

Go to the source code of this file.

Classes

class  DummyClass< ElementType >
 

Functions

void take_unique_ptr_by_reference (const std::unique_ptr< int > &ptr)
 
void test_pass_unique_ptr_by_reference ()
 
void test_return_unique_ptr_reference ()
 
std::unique_ptr< int > make_int_ptr (int value)
 
std::unique_ptr< int > && return_rvalue_ref_unique_ptr (int value)
 
void test_member_function_returning_unique_ptr ()
 
void test_member_function_returning_member_unique_ptr ()
 
void get_unique_ptr_from_a_function ()
 
void cause_of_trouble ()
 
int main ()
 

Variables

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

Function Documentation

◆ cause_of_trouble()

void cause_of_trouble ( )

Definition at line 171 of file 02-unique_ptr.cpp.

Here is the call graph for this function:

◆ get_unique_ptr_from_a_function()

void get_unique_ptr_from_a_function ( )

Definition at line 163 of file 02-unique_ptr.cpp.

Here is the call graph for this function:

◆ main()

int main ( )

Definition at line 185 of file 02-unique_ptr.cpp.

Here is the call graph for this function:

◆ make_int_ptr()

std::unique_ptr< int > make_int_ptr ( int  value)

Definition at line 104 of file 02-unique_ptr.cpp.

Here is the caller graph for this function:

◆ return_rvalue_ref_unique_ptr()

std::unique_ptr< int > && return_rvalue_ref_unique_ptr ( int  value)

Definition at line 112 of file 02-unique_ptr.cpp.

Here is the caller graph for this function:

◆ take_unique_ptr_by_reference()

void take_unique_ptr_by_reference ( const std::unique_ptr< int > &  ptr)

Definition at line 12 of file 02-unique_ptr.cpp.

Here is the caller graph for this function:

◆ test_member_function_returning_member_unique_ptr()

void test_member_function_returning_member_unique_ptr ( )

Definition at line 129 of file 02-unique_ptr.cpp.

Here is the call graph for this function:

◆ test_member_function_returning_unique_ptr()

void test_member_function_returning_unique_ptr ( )

Definition at line 119 of file 02-unique_ptr.cpp.

Here is the call graph for this function:

◆ test_pass_unique_ptr_by_reference()

void test_pass_unique_ptr_by_reference ( )

Definition at line 17 of file 02-unique_ptr.cpp.

Here is the call graph for this function:

◆ test_return_unique_ptr_reference()

void test_return_unique_ptr_reference ( )

Definition at line 81 of file 02-unique_ptr.cpp.

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

Variable Documentation

◆ endl

auto endl = tpf::endl

Definition at line 4 of file 02-unique_ptr.cpp.

◆ stream

tpf::sstream stream

Definition at line 3 of file 02-unique_ptr.cpp.