Topic: Clarification on DWP...


Author: Paul Russell aka Rusty <Rusty.Russell@adelaide.maptek.com.au>
Date: 1996/03/14
Raw View
The April DWP, 9.2 paragraph 12:

12A  static  data  member,  enumerator, member of an anonymous union, or
  nested type shall not have the same name as its class.

Does this mean immediately nested?  Or nested at all? ie. Is this code
legal?

struct A
{
  struct B
  {
    struct A {};
  };
};

Also, is there a similar restriction on namespaces?  I couldn't find it
anywhere...

TIA,
Rusty.
--
Rusty.Russell@adelaide.maptek.com.au           "Engineer? So you drive trains?"

Lies, damned lies, and out-of-date documentation.        #include <stddisclm.h>

---
[ 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                             ]