Skip to content

Commit

Permalink
Compiler compatibility for Visual Studio 2017 (v141) for template fri…
Browse files Browse the repository at this point in the history
…end operator == (#2792).

Make the operator not-friend is a sufficient solution. Closes #2792
  • Loading branch information
James Smith authored and horenmar committed Feb 23, 2024
1 parent f476bcb commit 4f3871d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/catch2/internal/catch_random_integer_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ namespace Catch {
struct ExtendedMultResult {
T upper;
T lower;
friend bool operator==( ExtendedMultResult const& lhs,
ExtendedMultResult const& rhs ) {
return lhs.upper == rhs.upper && lhs.lower == rhs.lower;
bool operator==( ExtendedMultResult const& rhs ) const {
return upper == rhs.upper && lower == rhs.lower;
}
};

Expand Down

0 comments on commit 4f3871d

Please sign in to comment.