Title
filesystem::canonical() still defined in terms of absolute(p, base)
Status
c++17
Section
[fs.op.canonical]
Submitter
Sergey Zubkov

Created on 2017-04-21.00:00:00 last changed 90 months ago

Messages

Date: 2017-07-15.22:46:09

Proposed resolution:

This wording is relative to N4659.

  1. Edit [fs.filesystem.syn] as indicated:

    path canonical(const path& p, const path& base = current_path());
    path canonical(const path& p, error_code& ec);
    path canonical(const path& p, const path& base, error_code& ec);
    
  2. Edit [fs.op.canonical] as indicated:

    path canonical(const path& p, const path& base = current_path());
    path canonical(const path& p, error_code& ec);
    path canonical(const path& p, const path& base, error_code& ec);
    

    -1- Effects: Converts p, which must exist, to an absolute path that has no symbolic link, dot, or dot-dot elements in its pathname in the generic format.

    -2- Returns: A path that refers to the same file system object as absolute(p, base). For the overload without a base argument, base is current_path(). SignaturesThe signature with argument ec returns path() if an error occurs.

    […]

Date: 2017-07-15.00:00:00

[ 2017-07-14, Toronto, Moved to Immediate ]

Date: 2017-07-15.00:00:00

[ 2017-07-14, Toronto, Davis Herring provides wording ]

Date: 2017-06-27.00:00:00

[ 2017-06-27 P1 after 5 positive votes on c++std-lib ]

Davis Herring: This needs to be P1 — due to a wording gap in P0492R2, 2 out of the 3 overloads of filesystem::canonical() have bad signatures and are unimplementable.

Date: 2017-04-21.00:00:00

This is from editorial issue #1620:

Since the resolution of US-78 was applied (as part of P0492R2), std::filesystem::absolute(path, base) no longer exists. However, std::filesystem::canonical is still defined in terms of absolute(p, base).

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2017-07-16 20:47:13adminsetstatus: immediate -> wp
2017-07-15 22:46:09adminsetmessages: + msg9371
2017-07-15 22:46:09adminsetstatus: new -> immediate
2017-07-14 05:05:37adminsetmessages: + msg9367
2017-07-14 05:05:37adminsetmessages: + msg9366
2017-06-27 18:59:13adminsetmessages: + msg9297
2017-04-21 00:00:00admincreate