------- Comment #38 from bangerth at dealii dot org  2007-08-29 03:15 -------
(In reply to comment #37)
> No it is not, it is still violating One definition rule as struct X
> will have a different member type for pimpl_ in each TU (this violates
> the whole idea of types being exported).

It is a good question in itself whether pimpl_ has a type at all -- it's a
pointer to an incomplete type in any case :-)


> This warning is not about style, it is about warning when you are most
> likely going to violat C++'s One definition rule with anonymous
> namespaces and you do violate it here as explained above.

Yes, I agree that whoever uses this idiom is walking a very fine line
indeed, and most definitely is violating at least good style. I can certainly
live with a warning.

W.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29365

Reply via email to