Skip to content

Commit

Permalink
Add missing operator!= definitions for C++ versions earlier than C++20
Browse files Browse the repository at this point in the history
by deriving from `WithEqual`.

PiperOrigin-RevId: 657980040
  • Loading branch information
QrczakMK committed Jul 31, 2024
1 parent ff856e2 commit 31c4dd1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion riegeli/chunk_encoding/transpose_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "absl/types/optional.h"
#include "absl/types/span.h"
#include "riegeli/base/chain.h"
#include "riegeli/base/compare.h"
#include "riegeli/base/external_ref.h"
#include "riegeli/base/recycling_pool.h"
#include "riegeli/bytes/backward_writer.h"
Expand Down Expand Up @@ -180,7 +181,7 @@ class TransposeEncoder : public ChunkEncoder {

// We build a tree structure of protocol buffer tags. `NodeId` uniquely
// identifies a node in this tree.
struct NodeId {
struct NodeId : public WithEqual<NodeId> {
explicit NodeId(chunk_encoding_internal::MessageId parent_message_id,
uint32_t tag);

Expand Down
1 change: 1 addition & 0 deletions riegeli/digests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ cc_library(
"//riegeli/base:any",
"//riegeli/base:arithmetic",
"//riegeli/base:chain",
"//riegeli/base:compare",
"//riegeli/base:dependency",
"//riegeli/base:to_string_view",
"//riegeli/base:type_traits",
Expand Down
3 changes: 2 additions & 1 deletion riegeli/digests/digester_handle.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "absl/types/optional.h"
#include "riegeli/base/any.h"
#include "riegeli/base/chain.h"
#include "riegeli/base/compare.h"
#include "riegeli/base/dependency.h"
#include "riegeli/base/dependency_manager.h"
#include "riegeli/base/to_string_view.h"
Expand Down Expand Up @@ -126,7 +127,7 @@ class
#ifdef ABSL_NULLABILITY_COMPATIBLE
ABSL_NULLABILITY_COMPATIBLE
#endif
DigesterBaseHandle {
DigesterBaseHandle : WithEqual<DigesterBaseHandle> {
public:
// Creates a `DigesterBaseHandle` which does not point to a target.
DigesterBaseHandle() = default;
Expand Down

0 comments on commit 31c4dd1

Please sign in to comment.