std::vector<uint8_t>&& takeData() { std::vector<uint8_t>&& temp = std::move(data); // temp - rvalue-ссылка на data return temp; }