Title
filesystem::weakly_canonical still defined in terms of canonical(p, base)
Status
c++20
Section
[fs.op.weakly.canonical]
Submitter
Jonathan Wakely

Created on 2017-10-14.00:00:00 last changed 46 months ago

Messages

Date: 2018-03-18.16:03:30

Proposed resolution:

This wording is relative to N4687.

  1. Change [fs.op.weakly_canonical] as indicated:

    path weakly_canonical(const path& p);
    path weakly_canonical(const path& p, error_code& ec);
    

    -1- Returns: […]

    -2- Effects: Using status(p) or status(p, ec), respectively, to determine existence, return a path composed by operator/= from the result of calling canonical() without a base argument and with a path argument composed of the leading elements of p that exist, if any, followed by the elements of p that do not exist, if any. For the first form, canonical() is called without an error_code argument. For the second form, canonical() is called with ec as an error_code argument, and path() is returned at the first error occurrence, if any.

    […]

Date: 2018-03-17.00:00:00

[ 2018-3-17 Adopted in Jacksonville ]

Date: 2017-10-16.00:00:00

[ 2017-10-16 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]

Date: 2017-10-14.00:00:00

LWG 2956 fixed canonical to no longer use a base path, but weakly_canonical should have been changed too:

Effects: Using status(p) or status(p, ec), respectively, to determine existence, return a path composed by operator/= from the result of calling canonical() without a base argument and with a […]

Since canonical doesn't accept a base argument, it doesn't make sense to talk about calling it without one.

History
Date User Action Args
2021-02-25 10:48:01adminsetstatus: wp -> c++20
2018-03-18 16:03:30adminsetmessages: + msg9745
2018-03-18 16:03:30adminsetstatus: voting -> wp
2018-02-12 01:13:49adminsetstatus: ready -> voting
2017-10-16 19:44:34adminsetmessages: + msg9479
2017-10-16 19:44:34adminsetstatus: new -> ready
2017-10-15 14:47:50adminsetmessages: + msg9478
2017-10-14 00:00:00admincreate