[cfe-commits] [PATCH] PR8800 Don't require an implicit conversion to reference-to-class to have a complete class type

Douglas Gregor dgregor at apple.com
Tue Jul 12 18:38:35 PDT 2011


On Jul 12, 2011, at 2:56 PM, Richard Smith wrote:

> 
> Hi,
> 
> The attached patch fixes PR8800. When building a conversion to A& via a
> class' operator A&(), we were requiring A to be complete. There seems to
> be no normative rule in the standard which requires this, but C++11 FDIS
> [basic.def.odr]p4 bullet 6 says "A class type T must be complete if [...]
> an expression [...] is converted to type pointer to T or reference to T
> using an implicit conversion" within a note.

That bullet is rather strange. I think it really means to talk about derived-to-base or base-to-derived conversions, but it's written more generally than that. It's non-normative, so we can ignore it.

> Assuming that note is incorrect, is this patch OK to check in?

Yes, please!

	- Doug



More information about the cfe-commits mailing list