This is the mail archive of the gcc-help@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]

error: no matching function for call to `Anton::Anton(Anton)`


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()
  };
}


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