Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing ambiguous equality operators for C++20 migration. #347

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

copybara-service[bot]
Copy link

Fixing ambiguous equality operators for C++20 migration.

This is an issue specifically on CRTP classes templated equality operators that is resolved by making equality operators free standing functions.

e.g.

implementation/local_object_test.cc:194:22: error: use of overloaded operator '==' is ambiguous (with operand types 'LocalObject<kClass>' and 'LocalObject<kClass2>')
  EXPECT_FALSE(val_1 == val_2);
               ~~~~~ ^  ~~~~~

See #346.

Sample failure https://github.com/google/jni-bind/actions/runs/11474529819/job/31930608615?pr=345.

@copybara-service copybara-service bot force-pushed the test_688985785 branch 11 times, most recently from c2df16c to 7c283af Compare October 23, 2024 23:11
This is an issue specifically on CRTP classes templated equality operators that is resolved by making equality operators free standing functions.

e.g.
```
implementation/local_object_test.cc:194:22: error: use of overloaded operator '==' is ambiguous (with operand types 'LocalObject<kClass>' and 'LocalObject<kClass2>')
  EXPECT_FALSE(val_1 == val_2);
               ~~~~~ ^  ~~~~~
```

See #346.

Sample failure https://github.com/google/jni-bind/actions/runs/11474529819/job/31930608615?pr=345.

PiperOrigin-RevId: 689141602
@copybara-service copybara-service bot merged commit e8b2c23 into main Oct 23, 2024
1 check passed
@copybara-service copybara-service bot deleted the test_688985785 branch October 23, 2024 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant