-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Compilation error with gcc 9.3.0 on Ubuntu 20.04 #312
Labels
Comments
Hi, I can confirm this bug on Pop!_OS 20.10 with |
Closed
Lastique
added a commit
to Lastique/tbb
that referenced
this issue
Dec 16, 2020
This resolves gcc warnings about deprecated in C++11 implicitly generated assignment operators when user-defined constructors are present. This is because the constructors are inherited by a user-declaration from a base class, while there is no operator= inheriting in C++ and the using declaration for operator= does not prevent the compiler from implicitly generating the operators. Since defining the operators then forces the compiler to implicitly define standard constructors as deleted, we also need to define the constructors as defaulted. We keep the using declaration for constructors to inherit the non-standard constructors. In concurrent_queue, the assignment operator was missing while copy/move constructors were present and contained non-trivial logic. The implicitly generated assignment operator would have been incorrect. The added assignment operator reuses copy/move constructors to implement assignment. Fixes uxlfoundation#312.
@kboyarinov, can you please follow up on the issue? |
Hi, I just compiled successfully on Pop!_OS 20.10 with the last version d86ed7f ! Thanks guys |
This issue was fixed in oneTBB 2021.2.0. |
Lastique
added a commit
to Lastique/tbb
that referenced
this issue
Nov 25, 2021
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. In concurrent_queue, the assignment operator was missing while copy/move constructors were present and contained non-trivial logic. The implicitly generated assignment operator would have been incorrect. The added assignment operator reuses copy/move constructors to implement assignment. In concurrent_bounded_queue, the assignment operator was also missing and would have been deleted because of std::atomic member, while the class also had copy and move constructors. The added assignment operator also reuses the existing constructors. Fixes uxlfoundation#312. Fixes uxlfoundation#372. Fixes uxlfoundation#373.
Lastique
added a commit
to Lastique/tbb
that referenced
this issue
Nov 25, 2021
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. In concurrent_queue, the assignment operator was missing while copy/move constructors were present and contained non-trivial logic. The implicitly generated assignment operator would have been incorrect. The added assignment operator reuses copy/move constructors to implement assignment. In concurrent_bounded_queue, the assignment operator was also missing and would have been deleted because of std::atomic member, while the class also had copy and move constructors. The added assignment operator also reuses the existing constructors. Fixes uxlfoundation#312. Fixes uxlfoundation#372. Fixes uxlfoundation#373. Signed-off-by: Andrey Semashev <andrey.semashev@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After cloing the repository and performing cmake
cmake --build <build_dir> failed with the following error:
The text was updated successfully, but these errors were encountered: