refactor: continue refactor project from C++17 to 23

This commit is contained in:
2025-07-25 10:49:07 +08:00
parent 4f0b3d19d1
commit b79df0c65e
22 changed files with 296 additions and 498 deletions

View File

@ -27,7 +27,7 @@ namespace yycc::string::op {
// Check expected size.
if (count < 0) {
// Invalid length returned by vsnprintf.
return std::unexpected(FormatError::NoExpSize);
return std::unexpected(FormatError::NoDesiredSize);
}
va_end(args1);

View File

@ -9,8 +9,8 @@
namespace yycc::string::op {
enum class FormatError {
NullFormat, ///< Given format string is nullptr.
NoExpSize, ///< Fail to fetch the expected size of result.
NullFormat, ///< Given format string is nullptr.
NoDesiredSize, ///< Fail to fetch the expected size of result.
BadWrittenSize, ///< The written size is different with expected size.
};