$STRING ENABLE
$MESSAGE NotFound
@ path std::string const &
"not found: {$path}"
std::string NotFoundStr( std::string const & path, std::locale const &loc );
std::string NotFoundStr( std::string const & path );

The overload without loc uses the global locale (std::locale()), as a default-constructed std::ostringstream would.

The text is appended to a std::string directly — strings as they are, integers with std::to_chars when the locale is C, everything else and every value with formats through a stream imbued with the locale — so the result is exactly what streaming would give, several times faster. See Text functions.

Options: naming, member placement.