Как стать автором
Обновить
5
0
Alexey Arkhipenko @Rualark

Developer

Отправить сообщение

Quick reference of C++ value categories: Part 2

Время на прочтение41 мин
Количество просмотров2.6K



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 →
Всего голосов 5: ↑5 и ↓0+5
Комментарии5

Quick reference of C++ value categories: Part 1

Время на прочтение13 мин
Количество просмотров7.3K

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 →
Всего голосов 8: ↑6 и ↓2+10
Комментарии0

Информация

В рейтинге
Не участвует
Зарегистрирован
Активность