mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
feat: add uppercase to integer fmt
for hex integer
This commit is contained in:
@@ -57,9 +57,10 @@ std::string to_string(const integer_format);
|
||||
struct integer_format_info
|
||||
{
|
||||
integer_format fmt = integer_format::dec;
|
||||
std::size_t width = 0; // minimal width (may exceed)
|
||||
std::size_t spacer = 0; // position of `_` (if 0, no spacer)
|
||||
std::string suffix = ""; // _suffix (library extension)
|
||||
bool uppercase = true; // hex with uppercase
|
||||
std::size_t width = 0; // minimal width (may exceed)
|
||||
std::size_t spacer = 0; // position of `_` (if 0, no spacer)
|
||||
std::string suffix = ""; // _suffix (library extension)
|
||||
};
|
||||
|
||||
bool operator==(const integer_format_info&, const integer_format_info&) noexcept;
|
||||
|
||||
@@ -66,10 +66,11 @@ TOML11_INLINE std::string to_string(const integer_format c)
|
||||
|
||||
TOML11_INLINE bool operator==(const integer_format_info& lhs, const integer_format_info& rhs) noexcept
|
||||
{
|
||||
return lhs.fmt == rhs.fmt &&
|
||||
lhs.width == rhs.width &&
|
||||
lhs.spacer == rhs.spacer &&
|
||||
lhs.suffix == rhs.suffix ;
|
||||
return lhs.fmt == rhs.fmt &&
|
||||
lhs.uppercase == rhs.uppercase &&
|
||||
lhs.width == rhs.width &&
|
||||
lhs.spacer == rhs.spacer &&
|
||||
lhs.suffix == rhs.suffix ;
|
||||
}
|
||||
TOML11_INLINE bool operator!=(const integer_format_info& lhs, const integer_format_info& rhs) noexcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user