I was reading a project in which I found this line. I am not able to understand what this line does.
std::ofstream("img_preview.jpg", std::ios::binary) << std::ifstream("img.jpg", std::ios::binary).rdbuf();
I tried to search this kind of syntax but couldn't find proper reference. Please help me out.