GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — C++20 now considers equality to be commutable (A == B) === (B == A) · andreasmolander/AliceO2@cb1c668

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Algorithm/test
    • pageparser.cxx
  • DataFormats/Headers/include/Headers
    • DataHeader.h
  • Framework/Core/test
    • test_ASoA.cxx
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Algorithm/test/pageparser.cxx‎

Copy file name to clipboardExpand all lines: Algorithm/test/pageparser.cxx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ struct ClusterData {
5050
{
5151
}
5252

53-
bool operator==(const ClusterData& rhs)
53+
bool operator==(const ClusterData& rhs) const
5454
{
5555
return clusterid == rhs.clusterid && x == rhs.x && y == rhs.y && z == rhs.z && e == rhs.e;
5656
}
Collapse file

‎DataFormats/Headers/include/Headers/DataHeader.h‎

Copy file name to clipboardExpand all lines: DataFormats/Headers/include/Headers/DataHeader.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ struct Descriptor {
286286
bool operator<(const Descriptor& other) const { return std::memcmp(this->str, other.str, N) < 0; }
287287
bool operator!=(const Descriptor& other) const { return not this->operator==(other); }
288288

289+
// Convesion operators for comparison with their implicitly convertible types
290+
friend bool operator==(const Descriptor& lhs, ImplicitConversion rhs) { return static_cast<ImplicitConversion>(lhs) == rhs; }
289291
// explicitly forbid comparison with e.g. const char* strings
290292
// use: value == Descriptor<N>("DESC") for the appropriate
291293
// template instantiation instead
Collapse file

‎Framework/Core/test/test_ASoA.cxx‎

Copy file name to clipboardExpand all lines: Framework/Core/test/test_ASoA.cxx
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ TEST_CASE("TestTableIteration")
147147

148148
b = tests2.begin();
149149
REQUIRE(b != e);
150-
REQUIRE((b + 1) == (b + 1));
151-
REQUIRE((b + 7) != b);
152-
REQUIRE((b + 7) != e);
153-
REQUIRE((b + 8) == e);
150+
REQUIRE(((b + 1) == (b + 1)));
151+
REQUIRE(((b + 7) != b));
152+
REQUIRE(((b + 7) != e));
153+
REQUIRE(((b + 8) == e));
154154

155155
for (auto& t : tests2) {
156156
REQUIRE(t.x() == value / 4);

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.