mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Fix printing OpNum that are not in default magic_enum range
This commit is contained in:
parent
4895a7de77
commit
fdfee8e905
@ -2,6 +2,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <magic_enum.hpp>
|
||||
|
||||
|
||||
namespace Coordination
|
||||
@ -64,3 +65,11 @@ static constexpr int32_t DEFAULT_OPERATION_TIMEOUT_MS = 10000;
|
||||
static constexpr int32_t DEFAULT_CONNECTION_TIMEOUT_MS = 1000;
|
||||
|
||||
}
|
||||
|
||||
/// This is used by fmt::format to print OpNum as strings.
|
||||
/// All OpNum values shoud be in range [min, max] to be printed.
|
||||
template <>
|
||||
struct magic_enum::customize::enum_range<Coordination::OpNum> {
|
||||
static constexpr int min = -100;
|
||||
static constexpr int max = 1000;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user