Files
scylladb/auth/role_or_anonymous.cc
Kefu Chai 2eca8b54de auth/role_or_anonymous: drop operator<< for role_or_anonymous
its declaration was removed in 84a9d2fa, which failed to remove
the implementation from .cc file.

in this change, let's remove operator<< for role_or_anonymous
completely.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#19243
2024-06-12 17:30:20 +03:00

23 lines
531 B
C++

/*
* Copyright (C) 2018-present ScyllaDB
*/
/*
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include "auth/role_or_anonymous.hh"
namespace auth {
bool is_anonymous(const role_or_anonymous& mr) noexcept {
return !mr.name.has_value();
}
}
auto fmt::formatter<auth::role_or_anonymous>::format(const auth::role_or_anonymous& mr,
fmt::format_context& ctx) const -> decltype(ctx.out()) {
return fmt::format_to(ctx.out(), "{}", mr.name.value_or("<anonymous>"));
}