title: Portable way to set file modification time in C++?
body: <p>I'm writing a C++ application that needs to be portable between at least Ubuntu 15, FreeBSD 11, MacOS X and Windows 7 (compiled with GCC, clang and MSVC). All of these systems have a notion of a file with at least a modification date/time.</p>
  
  <p>The question is: is there a way to set a <em>file modification time</em> using a single piece of C++ code that would work on all of these systems?</p>
  
  <p>NB: By setting the file modification time I mean setting it to any specified value, <em>not</em> the current time (i.e. not the <em>touch</em> functionality).</p>