title: g++ breaking change in std::filesystem::last_write_time
body: <p>With recent OS upgrade I noticed that small part of my code stopped compiling - it seems the reason is switching from <code>g++-8</code> to <code>g++-9</code>.</p>
  
  <p>This code is compiling alright on <code>g++ 8.3.0</code> (verified this using <code>gcc:8.3</code> image from Dockerhub)</p>
  
  <pre><code>#include &lt;filesystem&gt;
  #include &lt;chrono&gt;
  
  int main() {
      namespace fs = std::filesystem;
      using namespace std::chrono_literals;
      std::filesystem::last_write_time("test", std::chrono::system_clock::now() - 5min);
  }
  </code></pre>
  
  <p>On <code>g++ 9.1.0</code> it fails with:</p>
  
  <pre><code>test.cpp: In function 'int main()':
  test.cpp:8:69: error: no matching function for call to 'last_write_time(const char [5], std::chrono::time_point&lt;std::chrono::_V2::system_clock, std::chrono::duration&lt;long int, std::ratio&lt;1, 1000000000&gt; &gt; &gt;)'
      8 |  fs::last_write_time("test", std::chrono::system_clock::now() - 5min);
        |                                                                     ^
  In file included from /usr/local/include/c++/9.1.0/filesystem:39,
                   from test.cpp:1:
  /usr/local/include/c++/9.1.0/bits/fs_ops.h:243:19: note: candidate: 'std::filesystem::file_time_type std::filesystem::last_write_time(const std::filesystem::__cxx11::path&amp;)'
    243 |   file_time_type  last_write_time(const path&amp; __p);
        |                   ^~~~~~~~~~~~~~~
  /usr/local/include/c++/9.1.0/bits/fs_ops.h:243:19: note:   candidate expects 1 argument, 2 provided
  /usr/local/include/c++/9.1.0/bits/fs_ops.h:244:19: note: candidate: 'std::filesystem::file_time_type std::filesystem::last_write_time(const std::filesystem::__cxx11::path&amp;, std::error_code&amp;)'
    244 |   file_time_type  last_write_time(const path&amp; __p, error_code&amp; __ec) noexcept;
        |                   ^~~~~~~~~~~~~~~
  In file included from /usr/local/include/c++/9.1.0/filesystem:36,
                   from test.cpp:1:
  /usr/local/include/c++/9.1.0/bits/fs_fwd.h:362:47: note:   no known conversion for argument 2 from 'std::chrono::time_point&lt;std::chrono::_V2::system_clock, std::chrono::duration&lt;long int, std::ratio&lt;1, 1000000000&gt; &gt; &gt;' to 'std::error_code&amp;'
    362 |   file_time_type last_write_time(const path&amp;, error_code&amp;) noexcept;
        |                                               ^~~~~~~~~~~
  In file included from /usr/local/include/c++/9.1.0/filesystem:39,
                   from test.cpp:1:
  /usr/local/include/c++/9.1.0/bits/fs_ops.h:245:8: note: candidate: 'void std::filesystem::last_write_time(const std::filesystem::__cxx11::path&amp;, std::filesystem::file_time_type)'
    245 |   void last_write_time(const path&amp; __p, file_time_type __new_time);
        |        ^~~~~~~~~~~~~~~
  /usr/local/include/c++/9.1.0/bits/fs_ops.h:245:56: note:   no known conversion for argument 2 from 'time_point&lt;std::chrono::_V2::system_clock,[...]&gt;' to 'time_point&lt;std::filesystem::__file_clock,[...]&gt;'
    245 |   void last_write_time(const path&amp; __p, file_time_type __new_time);
        |                                         ~~~~~~~~~~~~~~~^~~~~~~~~~
  /usr/local/include/c++/9.1.0/bits/fs_ops.h:246:8: note: candidate: 'void std::filesystem::last_write_time(const std::filesystem::__cxx11::path&amp;, std::filesystem::file_time_type, std::error_code&amp;)'
    246 |   void last_write_time(const path&amp; __p, file_time_type __new_time,
        |        ^~~~~~~~~~~~~~~
  /usr/local/include/c++/9.1.0/bits/fs_ops.h:246:8: note:   candidate expects 3 arguments, 2 provided
  
  shell returned 1
  
  Press ENTER or type command to continue
  </code></pre>
  
  <p>Compile command: <code>g++ -std=c++17 test.cpp -lstdc++-fs</code> (even though linking <code>stdc++-fs</code> is unnecessary on since <code>g++9</code>)</p>
  
  <p>My question is - what is the idiomatic use of this function the way I intended? Namely changing the last write time of a file to five minutes ago.</p>
  
  <p>I understand I used this in somehow non-idiomatic way if a breaking change was introduced.</p>