diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-01-05 20:03:22 +0000 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-01-05 20:03:22 +0000 |
commit | beb04ce9d4d6b30ca881ff7f5ebd143433f84722 (patch) | |
tree | 8c97f8a1c134f6113986918eb2ef59b12c003aea /gcc/params.def | |
parent | d06f73a3872638cc2257743b5c947da9c9a3bfa4 (diff) | |
download | gcc-beb04ce9d4d6b30ca881ff7f5ebd143433f84722.zip gcc-beb04ce9d4d6b30ca881ff7f5ebd143433f84722.tar.gz gcc-beb04ce9d4d6b30ca881ff7f5ebd143433f84722.tar.bz2 |
Define new filesystem::__file_clock type
In C++17 the clock used for filesystem::file_time_type is unspecified,
allowing it to be chrono::system_clock. The C++2a draft requires it to
be a distinct type, with additional member functions to convert to/from
other clocks (either the system clock or UTC). In order to avoid an ABI
change later, this patch defines a new distinct type now, which will be
used for std::chrono::file_clock later.
* include/bits/fs_fwd.h (__file_clock): Define new clock.
(file_time_type): Redefine in terms of __file_clock.
* src/filesystem/ops-common.h (file_time): Add FIXME comment about
overflow.
* src/filesystem/std-ops.cc (is_set(perm_options, perm_options)): Give
internal linkage.
(internal_file_lock): New helper type for accessing __file_clock.
(do_copy_file): Use internal_file_lock to convert system time to
file_time_type.
(last_write_time(const path&, error_code&)): Likewise.
(last_write_time(const path&, file_time_type, error_code&)): Likewise.
From-SVN: r267602
Diffstat (limited to 'gcc/params.def')
0 files changed, 0 insertions, 0 deletions