------- Comment #4 from gcc at magfr dot user dot lysator dot liu dot se 2006-10-06 18:48 ------- I still fail to understand why this would inherently violate the ODR.
I agree with Andrew that if more than one translation unit sees the defintion of foo::bar then it will violate the ODR but if only one translation unit ever sees the definition of foo::bar then I see no problem with this. Externally foo::bar is exposed only as a undefined inner class. About the only thing you could use it for would be as a pointer target. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365