Skip to content

[filesystem_error.members] what() function to use non-existant function native_string()  #1629

Closed
@BoPersson

Description

@BoPersson

The description fo the what() function says:

"Returns: A string containing runtime_error::what(). The exact format is unspecified. Implementations
are encouraged but not required to include path1.native_string() if not empty, path2.native_-
string() if not empty, and system_error::what() strings in the returned string."

The native_string() should likely be just string().

Activity

jwakely

jwakely commented on May 17, 2017

@jwakely
Member

More likely native()

BoPersson

BoPersson commented on May 17, 2017

@BoPersson
Author

native() returns wstring on Windows, so cannot be used in an exception what-message.

jwakely

jwakely commented on May 17, 2017

@jwakely
Member

Good point. My implementation uses string() but then there's no difference for POSIX. Boost also uses string().

jensmaurer

jensmaurer commented on May 25, 2017

@jensmaurer
Member

Is this editorial? The fix seems normative.

added
lwgIssue must be reviewed by LWG.
on May 25, 2017
jwakely

jwakely commented on May 25, 2017

@jwakely
Member

It's being dealt with as an LWG issue.

jwakely

jwakely commented on May 25, 2017

@jwakely
Member

Although it's arguably not normative, since native_string() doesn't exist, so the current wording is inconsistent, and it's only encouragement anyway.

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

    lwgIssue must be reviewed by LWG.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jwakely@BoPersson@jensmaurer

        Issue actions

          [filesystem_error.members] what() function to use non-existant function native_string() · Issue #1629 · cplusplus/draft