Skip to content

MakeProject: generate operator=#8995

Merged
pcanal merged 1 commit intoroot-project:masterfrom
pcanal:master-issue-8987
Jan 20, 2022
Merged

MakeProject: generate operator=#8995
pcanal merged 1 commit intoroot-project:masterfrom
pcanal:master-issue-8987

Conversation

@pcanal
Copy link
Copy Markdown
Member

@pcanal pcanal commented Sep 14, 2021

This fixes #8987 (case where the base class deletes operator=).

In case where the class generated by MakeProject derived from a class that deletes the operator= then in some compiler we get the error below (which is expected since the class generated by MakeProject has a copy constructor which is needed by stl collection).

SRChh_ROOT6_mcgenProjectSource.cxx: In copy constructor ‘KKceex::KKceex(const KKceex&)’:
SRChh_ROOT6_mcgenProjectSource.cxx:922:54: error: use of deleted function ‘KKpart& KKpart::operator=(const KKpart&)’
  922 |    for (Int_t i=0;i<101;i++) m_Phot[i] = rhs.m_Phot[i];
      |                                                      ^
In file included from KKceex.h:21,
                 from KKhh2f.h:22,
                 from SRChh_ROOT6_mcgenProjectHeaders.h:1,
                 from SRChh_ROOT6_mcgenProjectSource.cxx:3:
KKpart.h:15:7: note: ‘KKpart& KKpart::operator=(const KKpart&)’ is implicitly declared as deleted because ‘KKpart’ declares a move constructor or move assignment operator
   15 | class KKpart : public TObject {
      |       ^~~~~~
c++: error: SRChh_ROOT6_mcgenProjectSource.o: No such file or directory

This fixes root-project#8987 (case where the base class deletes operator=).

In case where the class generated by MakeProject derived from a class that deletes the operator= then in some compiler we get the error  below (which is expected since the class generated by MakeProject has a copy constructor which is needed by stl collection).

```
SRChh_ROOT6_mcgenProjectSource.cxx: In copy constructor ‘KKceex::KKceex(const KKceex&)’:
SRChh_ROOT6_mcgenProjectSource.cxx:922:54: error: use of deleted function ‘KKpart& KKpart::operator=(const KKpart&)’
  922 |    for (Int_t i=0;i<101;i++) m_Phot[i] = rhs.m_Phot[i];
      |                                                      ^
In file included from KKceex.h:21,
                 from KKhh2f.h:22,
                 from SRChh_ROOT6_mcgenProjectHeaders.h:1,
                 from SRChh_ROOT6_mcgenProjectSource.cxx:3:
KKpart.h:15:7: note: ‘KKpart& KKpart::operator=(const KKpart&)’ is implicitly declared as deleted because ‘KKpart’ declares a move constructor or move assignment operator
   15 | class KKpart : public TObject {
      |       ^~~~~~
c++: error: SRChh_ROOT6_mcgenProjectSource.o: No such file or directory
```
@pcanal pcanal added the in:I/O label Sep 14, 2021
@pcanal pcanal self-assigned this Sep 14, 2021
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@pcanal pcanal requested a review from Axel-Naumann September 14, 2021 20:03
@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-ubuntu16/nortcxxmod.
Running on sft-ubuntu-1604-1.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2021-09-14T21:53:05.042Z] ghprbPullLongDescription=This fixes Missing operator= in code generated by MakeProject #8987 (case where the base class deletes operator=).\r\n\r\nIn case where the class generated by MakeProject derived from a class that deletes the operator= then in some compiler we get the error below (which is expected since the class generated by MakeProject has a copy constructor which is needed by stl collection).\r\n\r\n\r\nSRChh_ROOT6_mcgenProjectSource.cxx: In copy constructor 'KKceex::KKceex(const KKceex&)':\r\nSRChh_ROOT6_mcgenProjectSource.cxx:922:54: error: use of deleted function 'KKpart& KKpart::operator=(const KKpart&)'\r\n 922 | for (Int_t i=0;i&lt;101;i++) m_Phot[i] = rhs.m_Phot[i];\r\n | ^\r\nIn file included from KKceex.h:21,\r\n from KKhh2f.h:22,\r\n from SRChh_ROOT6_mcgenProjectHeaders.h:1,\r\n from SRChh_ROOT6_mcgenProjectSource.cxx:3:\r\nKKpart.h:15:7: note: 'KKpart& KKpart::operator=(const KKpart&)' is implicitly declared as deleted because 'KKpart' declares a move constructor or move assignment operator\r\n 15 | class KKpart : public TObject {\r\n | ^~~~~~\r\nc++: error: SRChh_ROOT6_mcgenProjectSource.o: No such file or directory\r\n\r\n\r\n

Failing tests:

@pcanal
Copy link
Copy Markdown
Member Author

pcanal commented Oct 18, 2021

@phsft-bot build

@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2021-10-18T20:08:56.085Z] ghprbPullLongDescription=This fixes Missing operator= in code generated by MakeProject #8987 (case where the base class deletes operator=).\r\n\r\nIn case where the class generated by MakeProject derived from a class that deletes the operator= then in some compiler we get the error below (which is expected since the class generated by MakeProject has a copy constructor which is needed by stl collection).\r\n\r\n\r\nSRChh_ROOT6_mcgenProjectSource.cxx: In copy constructor 'KKceex::KKceex(const KKceex&)':\r\nSRChh_ROOT6_mcgenProjectSource.cxx:922:54: error: use of deleted function 'KKpart& KKpart::operator=(const KKpart&)'\r\n 922 | for (Int_t i=0;i&lt;101;i++) m_Phot[i] = rhs.m_Phot[i];\r\n | ^\r\nIn file included from KKceex.h:21,\r\n from KKhh2f.h:22,\r\n from SRChh_ROOT6_mcgenProjectHeaders.h:1,\r\n from SRChh_ROOT6_mcgenProjectSource.cxx:3:\r\nKKpart.h:15:7: note: 'KKpart& KKpart::operator=(const KKpart&)' is implicitly declared as deleted because 'KKpart' declares a move constructor or move assignment operator\r\n 15 | class KKpart : public TObject {\r\n | ^~~~~~\r\nc++: error: SRChh_ROOT6_mcgenProjectSource.o: No such file or directory\r\n\r\n\r\n

@phsft-bot
Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft23.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@pcanal
Copy link
Copy Markdown
Member Author

pcanal commented Jan 19, 2022

@phsft-bot build

@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-ubuntu16/nortcxxmod, ROOT-ubuntu2004/soversion, mac1015/python3, mac11/cxx17, windows10/cxx14
How to customize builds

@phsft-bot
Copy link
Copy Markdown

Build failed on mac1015/python3.
Running on macitois22.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Errors:

  • [2022-01-19T22:58:41.859Z] ghprbPullLongDescription=This fixes Missing operator= in code generated by MakeProject #8987 (case where the base class deletes operator=).\r\n\r\nIn case where the class generated by MakeProject derived from a class that deletes the operator= then in some compiler we get the error below (which is expected since the class generated by MakeProject has a copy constructor which is needed by stl collection).\r\n\r\n\r\nSRChh_ROOT6_mcgenProjectSource.cxx: In copy constructor 'KKceex::KKceex(const KKceex&)':\r\nSRChh_ROOT6_mcgenProjectSource.cxx:922:54: error: use of deleted function 'KKpart& KKpart::operator=(const KKpart&)'\r\n 922 | for (Int_t i=0;i&lt;101;i++) m_Phot[i] = rhs.m_Phot[i];\r\n | ^\r\nIn file included from KKceex.h:21,\r\n from KKhh2f.h:22,\r\n from SRChh_ROOT6_mcgenProjectHeaders.h:1,\r\n from SRChh_ROOT6_mcgenProjectSource.cxx:3:\r\nKKpart.h:15:7: note: 'KKpart& KKpart::operator=(const KKpart&)' is implicitly declared as deleted because 'KKpart' declares a move constructor or move assignment operator\r\n 15 | class KKpart : public TObject {\r\n | ^~~~~~\r\nc++: error: SRChh_ROOT6_mcgenProjectSource.o: No such file or directory\r\n\r\n\r\n

@pcanal
Copy link
Copy Markdown
Member Author

pcanal commented Jan 20, 2022

The failures are unrelated

@pcanal pcanal merged commit f705d41 into root-project:master Jan 20, 2022
@pcanal pcanal deleted the master-issue-8987 branch January 20, 2022 12:49
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.

Missing operator= in code generated by MakeProject

3 participants