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

Fix incorrect definition of assignment operator in containers #676

Merged
merged 2 commits into from
Dec 2, 2021

Conversation

isaevil
Copy link
Contributor

@isaevil isaevil commented Dec 2, 2021

Description

Is a part of #318

Fixes #372

  • - git commit message contains appropriate signed-off-by string (see CONTRIBUTING.md for details)

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add respective label(s) to PR if you have permissions

  • bug fix - change which fixes an issue
  • new feature - change which adds functionality
  • tests - change in tests
  • infrastructure - change in infrastructure and CI
  • documentation - documentation update

Tests

  • added - required for new features and for some bug fixes
  • not needed

Documentation

  • updated in # - add PR number
  • needs to be updated
  • not needed

Breaks backward compatibility

  • Yes
  • No
  • Unknown

Notify the following users

@anton-potapov @Lastique

Other information

Lastique and others added 2 commits December 2, 2021 10:42
…ntainers.

This fixes incorrect return types of assignment operators imported from
base classes. Other than copy and move assignment operators, which are
generated by the compiler even if imported with a using-declaration,
the imported operators will be returning a reference to the base class
instead of the derived class.

Fixes #372.

Signed-off-by: Andrey Semashev <[email protected]>
@isaevil isaevil added the bug fix label Dec 2, 2021
@isaevil isaevil self-assigned this Dec 2, 2021
Copy link
Contributor

@anton-potapov anton-potapov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@anton-potapov anton-potapov merged commit 2713d41 into master Dec 2, 2021
@anton-potapov anton-potapov deleted the dev/isaevil/incorrect-assignment-op branch December 2, 2021 10:02
@anton-potapov
Copy link
Contributor

@Lastique , @isaevil thanks you very much!

kboyarinov pushed a commit that referenced this pull request Dec 27, 2021
* Fixed incorrect definitions of assignment operators in associative containers.

This fixes incorrect return types of assignment operators imported from
base classes. Other than copy and move assignment operators, which are
generated by the compiler even if imported with a using-declaration,
the imported operators will be returning a reference to the base class
instead of the derived class.

Fixes #372.

Signed-off-by: Andrey Semashev <[email protected]>
Signed-off-by: Ilya Isaev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using-declaration of assignment operators results in incorrect return type
3 participants