before this change, we rely on the default-generated fmt::formatter created from operator<<, but fmt v10 dropped the default-generated formatter. in this change, we define formatters for `service::paxos::proposal`, but its operator<< is preserved, as it is still used by our generic formatter for std::tuple<> which uses operator<< for printing the elements in it, so operator<< of this class is indirectly used. Refs #13245 Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
16 lines
448 B
C++
16 lines
448 B
C++
/*
|
|
* Copyright (C) 2019-present ScyllaDB
|
|
*
|
|
* Modified by ScyllaDB
|
|
*/
|
|
/*
|
|
* SPDX-License-Identifier: (AGPL-3.0-or-later and Apache-2.0)
|
|
*/
|
|
|
|
#include "proposal.hh"
|
|
|
|
auto fmt::formatter<service::paxos::proposal>::format(const service::paxos::proposal& proposal,
|
|
fmt::format_context& ctx) const -> decltype(ctx.out()) {
|
|
return fmt::format_to(ctx.out(), "proposal({})", proposal.ballot);
|
|
}
|