This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
error: no matching function for call to `Anton::Anton(Anton)`
- From: "e.karge" <e dot karge at struction dot de>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 8 Oct 2003 19:29:59 +0200 (CEST)
- Subject: error: no matching function for call to `Anton::Anton(Anton)`
- Reply-to: e dot karge at struction dot de
The following code snippet will generate the compiler message quoted in
the subject line. However, things worked fine with gcc 2.95.3. What's the
reason for this and is there any general solution to work around this?
regards,
eric
--- snip ---
class Anton
{
public:
Anton()
{
// init code
}
Anton(Anton &a)
{
// some code wich _needs_ to modify a
}
};
int main (int, char **)
{
Anton a[] = {
Anton(),
// ...
Anton()
};
}