Date
2017-03-14.03:14:09
Message id
9117

Content

Proposed resolution:

This wording is relative to N4640.

  1. Make the following edits to [fs.op.equivalent]:

    bool equivalent(const path& p1, const path& p2);
    bool equivalent(const path& p1, const path& p2, error_code& ec) noexcept;
    

    -1- Let s1 and s2 be file_statuss determined as if by status(p1) and status(p2), respectively.

    -2- Effects: Determines s1 and s2. If (!exists(s1) && !exists(s2)) || (is_other(s1) && is_other(s2)) an error is reported (27.10.7).

    -3- Returns: true, if s1 == s2 and p1 and p2 resolve to the same file system entity, else false. The signature with argument ec returns false if an error occurs.

    -4- Two paths are considered to resolve to the same file system entity if two candidate entities reside on the same device at the same location. [Note: On POSIX platforms, tThis is determined as if by the values of the POSIX stat structure, obtained as if by stat() for the two paths, having equal st_dev values and equal st_ino values. end note]

    -?- Remarks: !exists(p1) || !exists(p2) is an error.

    -5- Throws: As specified in 27.10.7.