------- Additional Comments From ddonovan at latentzero dot com  2005-02-15 
09:30 -------
Subject: RE:  error: incomplete type `Environment' used in nested name specifier

Thank you for putting your time into this but if you look at the
attached file, it is basically a simplified program of what is happening
in our much larger application. It compiles, links and runs as I would
expect (using gcc-3.4).

The output is:

Reporting
Obj = 15
Reporting
Reporting

I can't see why it won't work in the app!!!

Maybe I am missing something really simple...

Cheers, Dan.

Ps. I have a few more errors while trying to upgrade to 3.4. It is
pretty much all template related. I don't want to bother you as I'm sure
you've got better things to do, but if you don't ask...

Would you be willing to have a look at a list of errors I am getting?
You may have seen them before and know a quick fix! If not, no problem.

Thanks again, Dan.

-----Original Message-----
From: pinskia at gcc dot gnu dot org [mailto:[EMAIL PROTECTED] 
Sent: 14 February 2005 20:08
To: Daniel Donovan
Subject: [Bug c++/19950] error: incomplete type `Environment' used in
nested name specifier



------- Additional Comments From pinskia at gcc dot gnu dot org
2005-02-14 20:08 ------- (In reply to comment #3)
> I don't understand!

If I reduce the source further we get:
class Environment;
template<class T> struct ArrayCollection
{
  int insert(const T& theObj)
  {
    Environment::ReportError();
  }
};
struct Environment
{
  static void ReportError(void);
};

At the point were we call Environment::ReportError, Environment is not a
complete class so we don't 
know what the functions are at this point.  If we had changed the
template class ArrayCollection to a 
non template, we would get the error before 3.4.0 also because it needs
to be defined before.

To fix your code, maybe move a header file includes around but I did not
look into where the header 
files are.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19950

------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.

_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed
Scanning Services - powered by MessageLabs. For further information
visit http://www.mci.com

_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning 
Services - powered by MessageLabs. For further information visit 
http://www.mci.com


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19950

Reply via email to