This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++17 status.
Section: 31.12.13.4[fs.op.copy]Status:C++17Submitter: Jonathan WakelyOpened: 2014-07-28Last modified: 2017-07-30
Priority:0
View all otherissues in [fs.op.copy].
View all issues withC++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 ofcopy_symlink that takes acopy_options; it should becopy_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 adirectory_iterator is const; it should be:
as if by
for (constdirectory_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 (constdirectory_entry& x : directory_iterator(from))