Take the simple snippet:
void test(std::vector<int> && vec){
auto const ptr = data(vec);
auto new_vec {std::move(vec)};
(void)*ptr; // UB or not?
};
Is using pointer achieved through applying data
on the vector valid after moving the vector via the move constructor?
On a test project with MSVC-17.65 and /std:c++latest, It works. But is it just good luck or correct usage?