Topic: namespace and class


Author: Stanislaw Bochnak <S.Bochnak@microTOOL.com.pl>
Date: 1997/09/02
Raw View
Hi,

I cannot find in a C++ draft what happens when a class declaration A appears
after namespace A, e.g.

namespace A {
}


class A;
//or
enum A * bla;
class A * a;


Thanx,

Staszek


      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]





Author: "Jeff Wood" <jwood@squarerigger.com>
Date: 1997/09/04
Raw View
namespace A {
 // Do NOTHING here
}

class A {
 int a;
};

void main( void ) {
 // Do ABSOLUTELY nothing here!!!!!
};

VC++ 5.0 returned:
 error C2869: 'A' : has already been defined to be a namespace

Jeff.

      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]
---
[ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]