June 24, 2006
From a post in c.l.c++.m:

This doesn't compile whether or not
the WORKAROUND is defined.

----------------
// different compiler require or do not require the macro //#define WORKAROUND

namespace na
{
class ca;

namespace nb
{
class cb {
#ifdef WORKAROUND
   friend class na::ca;
#else
   friend class ca;
#endif
   cb() {}
};

} // nb

class ca
{
  nb::cb b;
};

} // na

int main() {
   na::ca a;
  return 0;
}
---------------------

The example comes from someone's work
on Boost port under BCB 2006.
Different compilers require or do not require
the workaround, DMC fails always.

/Pavel


1 2
Next ›   Last »