This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++17 status.
Section: 31.12.13.4 [fs.op.copy] Status: C++17 Submitter: Jonathan Wakely Opened: 2014-07-28 Last modified: 2017-07-30
Priority: 0
View all other issues in [fs.op.copy].
View all issues with C++17 status.
Discussion:
31.12.13.4 [fs.op.copy] paragraph 16 says:
Otherwise if
!exists(t) & (options & copy_options::copy_symlinks) != copy_options::none
, thencopy_symlink(from, to, options)
.
But there is no overload of copy_symlink
that takes a copy_options
;
it should be copy_symlink(from, to)
.
31.12.13.4 [fs.op.copy] Paragraph 26 says:
as if by
for (directory_entry& x : directory_iterator(from))
but the result of dereferencing a directory_iterator
is const; it should be:
as if by
for (const directory_entry& x : directory_iterator(from))
[Apr 2016 Issue updated to address the C++ Working Paper. Previously addressed File System TS]
Proposed resolution:
Change 31.12.13.4 [fs.op.copy] paragraph 16 as indicated:
Otherwise if
!exists(t) & (options & copy_options::copy_symlinks) != copy_options::none
, thencopy_symlink(from, to
., options)
Change 31.12.13.4 [fs.op.copy] paragraph 26 as indicated:
as if by
for (const directory_entry& x : directory_iterator(from))