Skip to content

Missing operator= in code generated by MakeProject #8987

@pcanal

Description

@pcanal

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions