Title
permissions function should not be noexcept due to narrow contract
Status
c++17
Section
[fs.op.permissions]
Submitter
Eric Fiselier

Created on 2016-05-28.00:00:00 last changed 89 months ago

Messages

Date: 2016-06-21.17:05:07

Proposed resolution:

This wording is relative to N4582.

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

    namespace std::filesystem {
      […]
    
      void permissions(const path& p, perms prms);
      void permissions(const path& p, perms prms, error_code& ec) noexcept;
    
      […]
    }
    
  2. Change [fs.op.permissions] as indicated:

    void permissions(const path& p, perms prms);
    void permissions(const path& p, perms prms, error_code& ec) noexcept;
    

    -1- Requires: !((prms & perms::add_perms) != perms::none && (prms & perms::remove_perms) != perms::none).

Date: 2016-06-27.16:42:33

[ 2016-06 Oulu ]

Moved to P0/Ready during issues prioritization.

Friday: status to Immediate

Date: 2016-05-28.00:00:00

Currently the signatures for permissions are:

void permissions(const path& p, perms prms);
void permissions(const path& p, perms prms, error_code& ec) noexcept;

However both overloads have a narrow contract since due to the requires clause:

Requires: !((prms & perms::add_perms) != perms::none && (prms & perms::remove_perms) != perms::none).

For this reason I believe the second overload of permissions should not be marked noexcept.

History
Date User Action Args
2017-07-30 20:15:43adminsetstatus: wp -> c++17
2016-06-28 13:14:43adminsetstatus: immediate -> wp
2016-06-27 16:42:33adminsetstatus: ready -> immediate
2016-06-21 17:05:07adminsetmessages: + msg8190
2016-06-20 16:35:58adminsetstatus: new -> ready
2016-06-05 15:19:54adminsetmessages: + msg8157
2016-05-28 00:00:00admincreate