Код: Выделить всё
#include
#include
void print(std::vector& vec)
{
for (int i : vec)
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79199743/why-does-passing-rvalue-to-lvalue-reference-work-in-this-case[/url]Код: Выделить всё
#include
#include
void print(std::vector& vec)
{
for (int i : vec)
{
std::cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79199743/why-does-passing-rvalue-to-lvalue-reference-work-in-this-case[/url]