June 24, 2006 Re: [8.49.1 bug] friend in parent namespace | ||||
---|---|---|---|---|
| ||||
Posted in reply to Pavel Vozenilek | 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 |
Copyright © 1999-2021 by the D Language Foundation