Created on 2017-08-24.00:00:00 last changed 45 months ago
Proposed resolution:
This wording is relative to N4687.
Edit [fs.op.copy] p4, bullet 4.8.2 as indicated:
(4.7) — Otherwise, if is_regular_file(f), then:
[…](4.8) — Otherwise, if
is_directory(f) && ((options & copy_options::recursive) != copy_options::none || options == copy_options::none)then:
(4.8.1) — If exists(t) is false, then
create_directory(to, from)
.(4.8.2) — Then, iterate over the files in
from
, as if byfor (const directory_entry& x : directory_iterator(from)) copy(x.path(), to/x.path().filename(), options | copy_options::unspecifiedin-recursive-copy);where in-recursive-copy is an bitmask element of copy_options that is not one of the elements in [fs.enum.copy.opts].
(4.9) — Otherwise, for the signature with argument ec, ec.clear().
(4.10) — Otherwise, no effects.
[ 2018-3-17 Adopted in Jacksonville ]
[ 2018-1-26 issues processing telecon ]
Status to 'Tentatively Ready' after striking the words 'Exposition-only' from the added text
[ 2017-11-08 ]
Priority set to 3 after five votes on the mailing list
Previous resolution: [SUPERSEDED]This wording is relative to N4687.
Edit [fs.op.copy] p4, bullet 4.8.2 as indicated:
(4.7) — Otherwise, if is_regular_file(f), then:
[…](4.8) — Otherwise, if
is_directory(f) && ((options & copy_options::recursive) != copy_options::none || options == copy_options::none)then:
(4.8.1) — If exists(t) is false, then
create_directory(to, from)
.(4.8.2) — Then, iterate over the files in
from
, as if byfor (const directory_entry& x : directory_iterator(from)) copy(x.path(), to/x.path().filename(), options | copy_options::unspecifiedin-recursive-copy);where in-recursive-copy is an exposition-only bitmask element of copy_options that is not one of the elements in [fs.enum.copy.opts].
(4.9) — Otherwise, for the signature with argument ec, ec.clear().
(4.10) — Otherwise, no effects.
[fs.op.copy]/4.8.2 says in the copy-a-directory case filesystem::copy performs:
Presumably this does not actually mean that the implementation is free to set whatever copy_option element it wishes (directories_only? recursive? create_hard_links?), or none at all, or – since unspecified behavior corresponds to the nondeterministic aspects of the abstract machine ([intro.execution]/3) – a nondeterministically picked element for every iteration of the loop. That would be outright insane. I'm fairly sure that what's intended here is to set an otherwise-unused bit in options so as to prevent recursion in the options == copy_options::none case.for (const directory_entry& x : directory_iterator(from)) copy(x.path(), to/x.path().filename(), options | copy_options::unspecified);
History | |||
---|---|---|---|
Date | User | Action | Args |
2021-02-25 10:48:01 | admin | set | status: wp -> c++20 |
2018-03-18 16:03:30 | admin | set | messages: + msg9742 |
2018-03-18 16:03:30 | admin | set | status: voting -> wp |
2018-02-12 01:13:49 | admin | set | status: ready -> voting |
2018-01-28 19:43:07 | admin | set | messages: + msg9657 |
2018-01-28 19:43:07 | admin | set | status: new -> ready |
2017-11-09 15:13:04 | admin | set | messages: + msg9517 |
2017-08-27 13:52:21 | admin | set | messages: + msg9455 |
2017-08-24 00:00:00 | admin | create |