Skip to content

Structured bindings for functions that might "return" multiple things #31

@jonesmz

Description

@jonesmz

https://en.cppreference.com/w/cpp/language/structured_binding

Functions such as those that accept an optional pointer-to-string to allow the called to be informed of errors are good candidates for this.

Either returning an empty std::string to indicate no error, or returning an std::optional, depending on if std::string's default constructor allocates on any known std implementations (It does in some older standard libs, but it's unclear if the standard has changed to prohibit that.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C++17The last set of patches (Until C++20 is out)patchIntended to be part of the patch series that makes up splinter

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions