Skip to content

<filesystem>: filesystem_error's copy functions are not noexcept #808

Description

The standard draft says that copy functions of every standard exception class are noexcept in [exception]/2. The wording has been changed since N4659 but the change is treated editorial.

Currently MS STL's filesystem_error directly holds two paths and one string as its subobject, which makes its defaulted (implicitly declared) copy functions non-noexcept.

libc++ and libstdc++ use a shared_ptr or its equivalent alternative to hold these objects, and thus the copy functions can be noexcept.


vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfilesystemC++17 filesystemvNextBreaks binary compatibility

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions