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

Go to the source code of this file.

Classes

class  MyClass
 

Macros

#define FUNCTION_NAME   __PRETTY_FUNCTION__
 

Functions

void test_which_member_function_gets_called ()
 
void test_pointer_that_points_to_const_object ()
 
MyClassget_a_reference ()
 
void test_get_a_reference ()
 
MyClasslegal_return_value (MyClass &object)
 
MyClasslegal_return_value_again (MyClass *ptr)
 
MyClasslegal_but_suspicious (MyClass &&rvalue)
 
MyClasslegal_but_dangerous (const MyClass &const_lvalue_ref)
 
int main ()
 

Macro Definition Documentation

◆ FUNCTION_NAME

#define FUNCTION_NAME   __PRETTY_FUNCTION__

Definition at line 8 of file const_pointer.cpp.

Function Documentation

◆ get_a_reference()

MyClass & get_a_reference ( )

Definition at line 204 of file const_pointer.cpp.

Here is the caller graph for this function:

◆ legal_but_dangerous()

MyClass & legal_but_dangerous ( const MyClass const_lvalue_ref)

Definition at line 243 of file const_pointer.cpp.

◆ legal_but_suspicious()

MyClass & legal_but_suspicious ( MyClass &&  rvalue)

Definition at line 238 of file const_pointer.cpp.

◆ legal_return_value()

MyClass * legal_return_value ( MyClass object)

Definition at line 227 of file const_pointer.cpp.

◆ legal_return_value_again()

MyClass & legal_return_value_again ( MyClass ptr)

Definition at line 233 of file const_pointer.cpp.

◆ main()

int main ( )

Definition at line 249 of file const_pointer.cpp.

Here is the call graph for this function:

◆ test_get_a_reference()

void test_get_a_reference ( )

Definition at line 217 of file const_pointer.cpp.

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

◆ test_pointer_that_points_to_const_object()

void test_pointer_that_points_to_const_object ( )

Definition at line 162 of file const_pointer.cpp.

◆ test_which_member_function_gets_called()

void test_which_member_function_gets_called ( )

Definition at line 151 of file const_pointer.cpp.

Here is the call graph for this function: