r258768 - [Sema] Incomplete types are OK for covariant returns
Kim Gräsman via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 31 08:24:14 PST 2016
On Sun, Jan 31, 2016 at 2:50 PM, David Majnemer
<david.majnemer at gmail.com> wrote:
> It is the same issue as CWG defect report 1250:
> I forget how to tell how far back a DR applies but I'd guess this one goes
> as far back as C++11.
Thanks, I didn't know there was a DR for this.
I find the standards text is a little vague but your change seems to
indicate that cv-qualifiers never weighs into covariance.
The reason I ask is we handle this explicitly in IWYU, and we treat
cv-qual differences as covariant (requiring the complete type). It
doesn't look like that was the standard's intent. We should probably
follow Clang here in a coming release, assuming other compilers agree.
It looks from the bug-report that they do, at least newer versions.
More information about the cfe-commits