public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: "No matching function" -- not finding copy constructor
       [not found] <17034.5435.884892.30668@gargle.gargle.HOWL>
@ 2005-05-17 16:16 ` Stefan Strasser
  0 siblings, 0 replies; only message in thread
From: Stefan Strasser @ 2005-05-17 16:16 UTC (permalink / raw)
  To: Paul Koning, gcc-help

(moving to gcc-help@gcc.gnu.org)

Paul Koning schrieb:
> 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&)

this is not a copy constructor, CxnIndex(CxnIndex const &) is...

> Indeces.hh:145: note:                 ... and some more


...so these would be interesting.
CxnIndex(CxnIndex &) only accepts non-const l-values.

> 
> 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...
> 

-- 
Stefan Strasser

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-17 16:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <17034.5435.884892.30668@gargle.gargle.HOWL>
2005-05-17 16:16 ` "No matching function" -- not finding copy constructor Stefan Strasser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).