This page is a snapshot from the LWG issues list, see the Library Active Issues List for more information and the meaning of TS status.

2629. [filesys.ts] [PDTS] Unclear semantics of read_symlink on error

Section: 15.27 [filesys.ts::fs.op.read_symlink] Status: TS Submitter: GB-16 Opened: 2014-01-20 Last modified: 2017-07-30

Priority: Not Prioritized

View all issues with TS status.

Discussion:

Addresses: filesys.ts

Unclear semantics of read_symlink on error: 15.27 [fs.op.read_symlink] has: Returns: If p resolves to a symbolic link, a path object containing the contents of that symbolic link. Otherwise path(). and also [Note: It is an error if p does not resolve to a symbolic link. -- end note]

I do not believe path() can be a valid return for the overload not taking error_code.

Strike "Otherwise path()."

[2014-02-09, Beman Dawes provides wording]

[2014-02-13 LWG/SG-3 Issaquah: Proposed wording accepted.]

Proposed resolution:

Change 15.27 [fs.op.read_symlink]:

Returns:  If p resolves to a symbolic link, a path object containing the contents of that symbolic link. Otherwise path(). The signature with argument ec returns path() if an error occurs.

Throws: As specified in Error reporting. [Note: It is an error if p does not resolve to a symbolic link. — end note]