Pull to refresh
5
0
Alexey Arkhipenko @Rualark

Developer

Send message

Quick reference of C++ value categories: Part 2

Reading time41 min
Views2.5K



Go to Part 1


Passing parameters to a function


When passing parameter to a function, category of a passed expression is implicitly converted to the category of function parameter: void f(TO_TYPE p); FROM_TYPE x; f(x); This implicit conversion takes place the same way as during an assignment (see "Assignment" section above) except that function definition cannot contain "auto" types.


Read more →
Total votes 5: ↑5 and ↓0+5
Comments5

Quick reference of C++ value categories: Part 1

Reading time13 min
Views6.7K

image

The goal of this quick reference is to collect in one place and organize information about value categories in C++, assignment, parameter passing and returning from functions. I tried to make this quick reference convenient to quickly compare and select one of solutions possible, this is why I made several tables here.


For introduction to the topic, please use the following links:


C++ rvalue references and move semantics for beginners
Rvalues redefined
C++ moves for people who don’t know or care what rvalues are
Scott Meyers. Effective Modern C++. 2015
Understanding Move Semantics and Perfect Forwarding: Part 1
Understanding Move Semantics and Perfect Forwarding: Part 2
Understanding Move Semantics and Perfect Forwarding: Part 3
Do we need move and copy assignment

Read more →
Total votes 14: ↑12 and ↓2+10
Comments0

Information

Rating
Does not participate
Registered
Activity