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.)
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.)