Explicitly specify inheritance mode.

This commit is contained in:
levlam 2021-07-04 18:22:20 +03:00
parent 93a92b27fc
commit 370d443a9d
4 changed files with 9 additions and 9 deletions

View File

@ -35,7 +35,7 @@ struct overload<F> : public F {
template <class F, class... Fs>
struct overload<F, Fs...>
: public overload<F>
, overload<Fs...> {
, public overload<Fs...> {
overload(F f, Fs... fs) : overload<F>(f), overload<Fs...>(fs...) {
}
using overload<F>::operator();

View File

@ -59,7 +59,7 @@ class AbridgedTransport final : public ITransport {
}
};
class IntermediateTransport : ITransport {
class IntermediateTransport final : public ITransport {
public:
explicit IntermediateTransport(bool with_padding) : with_padding_(with_padding) {
}

View File

@ -47,9 +47,9 @@ class ActorContext {
std::weak_ptr<ActorContext> this_ptr_;
};
class ActorInfo
class ActorInfo final
: private ListNode
, HeapNode {
, private HeapNode {
public:
enum class Deleter : uint8 { Destroy, None };

View File

@ -448,7 +448,7 @@ class JsonValue;
using JsonObject = vector<std::pair<MutableSlice, JsonValue>>;
using JsonArray = vector<JsonValue>;
class JsonValue final : public Jsonable {
class JsonValue final : private Jsonable {
public:
enum class Type { Null, Number, Boolean, String, Array, Object };
@ -685,7 +685,7 @@ inline StringBuilder &operator<<(StringBuilder &sb, JsonValue::Type type) {
}
}
class VirtuallyJsonable : public Jsonable {
class VirtuallyJsonable : private Jsonable {
public:
virtual void store(JsonValueScope *scope) const = 0;
VirtuallyJsonable() = default;
@ -766,7 +766,7 @@ StrT json_encode(const ValT &val, bool pretty = false) {
}
template <class T>
class ToJsonImpl final : public Jsonable {
class ToJsonImpl final : private Jsonable {
public:
explicit ToJsonImpl(const T &value) : value_(value) {
}
@ -789,7 +789,7 @@ void to_json(JsonValueScope &jv, const T &value) {
}
template <class F>
class JsonObjectImpl : Jsonable {
class JsonObjectImpl : private Jsonable {
public:
explicit JsonObjectImpl(F &&f) : f_(std::forward<F>(f)) {
}
@ -808,7 +808,7 @@ auto json_object(F &&f) {
}
template <class F>
class JsonArrayImpl : Jsonable {
class JsonArrayImpl : private Jsonable {
public:
explicit JsonArrayImpl(F &&f) : f_(std::forward<F>(f)) {
}