This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

"No matching function" -- not finding copy constructor


I'm upgrading to V4.0.0 and struggling with some code that's seriously
into templates.  One puzzling error is this one:

keyed_obj.hh:159: error: no matching function for call to 'CxnIndex::CxnIndex(CxnIndex)'
Indeces.hh:150: note: candidates are: CxnIndex::CxnIndex(CxnIndex&)
Indeces.hh:145: note:                 ... and some more

It's not entirely clear to me why something very much like a copy
constructor is being invoked in the first place.  But the bigger
puzzle is: why isn't the copy constructor being matched?  I would have
thought that any call with a T argument should match a function or
method with an &T argument in its declaration...

       paul



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]