This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of C++20 status.
filesystem::weakly_canonical still defined in terms of canonical(p, base)Section: 31.12.13.40 [fs.op.weakly.canonical] Status: C++20 Submitter: Jonathan Wakely Opened: 2017-10-14 Last modified: 2021-06-06
Priority: 0
View all other issues in [fs.op.weakly.canonical].
View all issues with C++20 status.
Discussion:
LWG 2956(i) fixed canonical to no longer use a base path, but weakly_canonical should have been
changed too:
Effects: Using
status(p)orstatus(p, ec), respectively, to determine existence, return a path composed byoperator/=from the result of callingcanonical()without abaseargument and with a […]
Since canonical doesn't accept a base argument, it doesn't make sense
to talk about calling it without one.
[ 2017-10-16 Moved to Tentatively Ready after 5 positive votes on c++std-lib. ]
[2018-3-17 Adopted in Jacksonville]
Proposed resolution:
This wording is relative to N4687.
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: Usingstatus(p)orstatus(p, ec), respectively, to determine existence, return a path composed byoperator/=from the result of callingcanonical()without awith a path argument composed of the leading elements ofbaseargument andpthat exist, if any, followed by the elements ofpthat do not exist, if any. For the first form,canonical()is called without anerror_codeargument. For the second form,canonical()is called with ec as anerror_codeargument, andpath()is returned at the first error occurrence, if any. […]