For the code snippet below, does the file is guaranteed to be written to the disk just after\when the std::fstream is destroyed?
#include<iostream>
#include<fstream>
using namespace std;
int main(int argc,char* argv[]){
{
std::fstream file{"test.txt"};
file << "when the file is actually written out?" << std::endl;
}
return 0;
}