Add mapped_file_region::sync(), equivalent to POSIX msync,
synchronizing written content to disk without unmapping the region.
Asserts if the mode is not mapped_file_region::readwrite.
Note that I don't have access to a Windows machine, so I can't
easily run those unit tests.
I'm mildly concerned that there are assertions that will prevent the temporary file from being deleted if/when the test fails. Accumulation of orphaned temp files can slow down tests, eat up disk quotas, etc.
There is a fs::TempFile class that will delete the file when it goes out of scope. Or, perhaps most of these ASSERT_s could be EXPECT_s.